Skip to main content

Configure Routing

FastGateway supports various routing rules to direct traffic to backends.

Path Matching​

TypeDescription
ExactMatches the exact path
PrefixMatches paths starting with value
RegexMatches paths using regular expressions

Header Matching​

Match requests based on header values:

matches:
- headers:
- name: "X-Version"
value: "v2"

Method Matching​

Route based on HTTP methods:

matches:
- method: "POST"

Query Parameter Matching​

Match on query string parameters:

matches:
- queryParams:
- name: "version"
value: "beta"

gRPC Routes​

For gRPC traffic, use service and method matching:

protocol: grpc
matches:
- grpcService: "myapp.UserService"
grpcMethod: "GetUser"

gRPC routes deploy as GRPCRoute CRD and support service-only matching (all methods) or service+method for specific endpoints.