routing.proto
Package: supergloo.solo.io
Types:
- RoutingRule Top-Level Resource
- RoutingRuleSpec
- RetryPolicy
- RetryBudget
- TrafficShifting
- FaultInjection
- Delay
- Type
- Abort
- HeaderManipulation
Source File: github.com/solo-io/supergloo/api/v1/routing.proto
RoutingRule
a routing rule applies some L7 routing features to an existing mesh routing rules specify the following: for all requests: - originating from from source pods - sent to destination pods - matching one or more request matcher apply the specified RoutingRuleSpec
"status": .core.solo.io.Status
"metadata": .core.solo.io.Metadata
"targetMesh": .core.solo.io.ResourceRef
"sourceSelector": .supergloo.solo.io.PodSelector
"destinationSelector": .supergloo.solo.io.PodSelector
"requestMatchers": []gloo.solo.io.Matcher
"spec": .supergloo.solo.io.RoutingRuleSpec
Field | Type | Description | Default |
---|---|---|---|
status |
.core.solo.io.Status | Status indicates the validation status of this resource. Status is read-only by clients, and set by supergloo during validation | |
metadata |
.core.solo.io.Metadata | Metadata contains the object metadata for this resource | |
targetMesh |
.core.solo.io.ResourceRef | target where we apply this rule. this can be a mesh group or an individual mesh | |
sourceSelector |
.supergloo.solo.io.PodSelector | requests originating from these pods will have the rule applied leave empty to have all pods in the mesh apply these rules > Note: Source Selectors are ignored when RoutingRules are applied to pods in a Linkerd mesh. RoutingRules will apply to all selected destinations in Linkerd, regardless of the source. | |
destinationSelector |
.supergloo.solo.io.PodSelector | requests destined for these pods will have the rule applied leave empty to apply to all destination pods in the mesh | |
requestMatchers |
[]gloo.solo.io.Matcher | if specified, this rule will only apply to http requests in the mesh matching these parameters note that Linkerd only supports matching on Request Path and Method | |
spec |
.supergloo.solo.io.RoutingRuleSpec | contains the configuration that will be applied to selected pods within the target mesh(es) |
RoutingRuleSpec
the routing configuration that will be applied to the mesh(es)
"trafficShifting": .supergloo.solo.io.TrafficShifting
"faultInjection": .supergloo.solo.io.FaultInjection
"requestTimeout": .google.protobuf.Duration
"retries": .supergloo.solo.io.RetryPolicy
"corsPolicy": .istio.networking.v1alpha3.CorsPolicy
"mirror": .gloo.solo.io.Destination
"headerManipulation": .supergloo.solo.io.HeaderManipulation
Field | Type | Description | Default |
---|---|---|---|
trafficShifting |
.supergloo.solo.io.TrafficShifting | enables traffic shifting, i.e. to reroute requests to a different service, to a subset of pods based on their label, and/or split traffic between multiple services | |
faultInjection |
.supergloo.solo.io.FaultInjection | enable fault injection on requests | |
requestTimeout |
.google.protobuf.Duration | set a timeout on requests | |
retries |
.supergloo.solo.io.RetryPolicy | set a retry policy on requests | |
corsPolicy |
.istio.networking.v1alpha3.CorsPolicy | set a Cross-Origin Resource Sharing policy (CORS) for requests. Refer to https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS for further details about cross origin resource sharing. | |
mirror |
.gloo.solo.io.Destination | Mirror HTTP traffic to a another destination. Traffic will still be sent to its original destination as normal. | |
headerManipulation |
.supergloo.solo.io.HeaderManipulation | manipulate request and response headers |
RetryPolicy
RetryPolicy contains mesh-specific retry configuration Different meshes support different Retry features SuperGloo’s RetryPolicy exposes config for multiple meshes simultaneously, Allowing the same RoutingRule to apply retries to different mesh types The configuration applied to the target mesh will use the corresponding config for each type, while other config types will be ignored
"maxRetries": .istio.networking.v1alpha3.HTTPRetry
"retryBudget": .supergloo.solo.io.RetryBudget
Field | Type | Description | Default |
---|---|---|---|
maxRetries |
.istio.networking.v1alpha3.HTTPRetry | retry each failed request until success or max number of retries met this retry policy will be applied to any targeted Istio Mesh Instances | |
retryBudget |
.supergloo.solo.io.RetryBudget | allocate a ‘retry budget’ for each mesh sidecar once the proxy reaches its retry budget limit, it will stop retrying all requests for the given retry window. this can be used to prevent cascading failures when outages cause bursts of retries. this retry policy will be applied to any targeted Linkerd Mesh Instances |
RetryBudget
RetryBudget describes the maximum number of retries that should be issued to the destination services. Can only be applied to Linkerd meshes
"retryRatio": float
"minRetriesPerSecond": int
"ttl": .google.protobuf.Duration
Field | Type | Description | Default |
---|---|---|---|
retryRatio |
float |
The ratio of additional traffic that may be added by retries. A retry_ratio of 0.1 means that 1 retry may be attempted for every 10 regular requests. A retry_ratio of 1.0 means that 1 retry may be attempted for every 1 regular request (in other words, total request load may be doubled as a result of retries). | |
minRetriesPerSecond |
int |
The proxy may always attempt this number of retries per second, even if it would violate the retryRatio. This is to allow retries to happen even when the request rate is very low. | |
ttl |
.google.protobuf.Duration | This duration indicates for how long requests should be considered for the purposes of enforcing the retryRatio. A higher value considers a larger window and therefore allows burstier retries. |
TrafficShifting
requests for this rule will be routed to these destinations
"destinations": .gloo.solo.io.MultiDestination
Field | Type | Description | Default |
---|---|---|---|
destinations |
.gloo.solo.io.MultiDestination | split traffic between these subsets based on their weights weights are relative to the sum of the weights |
FaultInjection
FaultInjection can be used to specify one or more faults to inject while forwarding http requests to the destination specified in a route. Faults include aborting the Http request from downstream service, and/or delaying proxying of requests. A fault rule MUST HAVE delay or abort.
"delay": .supergloo.solo.io.FaultInjection.Delay
"abort": .supergloo.solo.io.FaultInjection.Abort
"percentage": float
Field | Type | Description | Default |
---|---|---|---|
delay |
.supergloo.solo.io.FaultInjection.Delay | Delay requests before forwarding, emulating various failures such as network issues, overloaded upstream service, etc. | |
abort |
.supergloo.solo.io.FaultInjection.Abort | Abort Http request attempts and return error codes back to downstream service, giving the impression that the upstream service is faulty. | |
percentage |
float |
Percentage of requests to be faulted with the error code provided. Values range between 0 and 100 |
Delay
The fixedDelay field is used to indicate the amount of delay in seconds. The optional percentage field can be used to only delay a certain percentage of requests. If left unspecified, all request will be delayed.
"duration": .google.protobuf.Duration
"delayType": .supergloo.solo.io.FaultInjection.Delay.Type
Field | Type | Description | Default |
---|---|---|---|
duration |
.google.protobuf.Duration | duration of delay, matches golang duration spec | |
delayType |
.supergloo.solo.io.FaultInjection.Delay.Type | type of delay based on the enum below |
Type
types of delays available, currently only fixed is supported
Name | Description |
---|---|
FIXED |
Abort
The httpStatus field is used to indicate the HTTP status code to return to the caller. The optional percentage field can be used to only abort a certain percentage of requests. If not specified, all requests are aborted.
"httpStatus": int
Field | Type | Description | Default |
---|---|---|---|
httpStatus |
int |
REQUIRED. HTTP status code to use to abort the Http request. |
HeaderManipulation
manipulate request and response headers
"removeResponseHeaders": []string
"appendResponseHeaders": map<string, string>
"removeRequestHeaders": []string
"appendRequestHeaders": map<string, string>
Field | Type | Description | Default |
---|---|---|---|
removeResponseHeaders |
[]string |
HTTP headers to remove before returning a response to the caller. | |
appendResponseHeaders |
map<string, string> |
Additional HTTP headers to add before returning a response to the caller. | |
removeRequestHeaders |
[]string |
HTTP headers to remove before forwarding a request to the destination service. | |
appendRequestHeaders |
map<string, string> |
Additional HTTP headers to add before forwarding a request to the destination service. |