Skip to main content

Routes

Routes define how traffic flows to backend services through Kubernetes Gateway API resources. HTTP and gRPC routes attach to domains and match on hostname, path, and headers. TCP and UDP routes attach to streams and route by listener port.

A domain's Routes tab in FastGateway, showing a prefix route forwarding to a backend service

Route Types​

TypeResourceAttaches toUse Case
HTTPHTTPRouteDomainREST APIs, web applications
gRPCGRPCRouteDomaingRPC services
TCPTCPRouteStreamDatabases, Redis, Kafka, other TCP services
UDPUDPRouteStreamDNS, syslog, other UDP services

HTTP and gRPC routes are hostname-keyed: they match incoming requests by hostname, path, header, method, and query. TCP and UDP routes are port-keyed: they route by the listener port alone, with no Layer-7 matching. See Streams for how TCP and UDP routing works.

Matching Rules​

Routes match incoming requests using:

Match TypeHTTPgRPC
Path/api/v1/*N/A
MethodGET, POSTN/A
HeadersX-Version: v2X-Version: v2
Query Parameters?debug=trueN/A
Service/MethodN/Amyservice/MyMethod

Backend Configuration​

On the route builder's Traffic tab, a route forwards to one or more backends. Each backend is a Kubernetes Service (namespace, service, port) or an external service (address, port). Add more than one backend to split traffic by weight, or mark a backend as a fallback so it only takes traffic when the primaries are unhealthy.

FieldDescription
Backend typeKubernetes Service, or External Service
Service / PortThe target service and port (plus namespace for Kubernetes services)
WeightShare of traffic (0 to 100) when splitting across backends
RolePrimary, or Fallback for failover

Approval Workflow​

Routes follow a controlled deployment process:

StatusDescription
PendingAwaiting approval
ApprovedReady for deployment
DeployedActive in Kubernetes
RejectedApproval denied

Traffic Features​

Routes support advanced traffic management:

  • Timeouts: Request and backend timeouts
  • Retries: Automatic retry with backoff
  • Rate Limiting: Request throttling
  • Circuit Breaker: Failure protection