rule
Last updated
Was this helpful?
Last updated
Was this helpful?
Rules dictate logic on traffic is routed. Attributes from incoming requests are matched against preconfigured rule
objects to determine where the outgoing upstream request should be routed. Rules are specified programmatically in and as an array in the Rules
attribute.
rule_key
A unique key for each rule. When a request is routed by a rule, it appends the header "X-Gm-Rule"
with the rule key.
methods
The supported request methods for this rule. Setting to an empty array will allow all methods.
matches
constraints
NOTE:
constraints
also contains adark
and alight
field which currently have no effect.dark
array will be used in future versions to support traffic shadowing to Instances. Similarly thetap
array will determine an Instance to send a copy of the request to, comparing the response to thelight
response.
cohort_seed
This field has no effect.
for this rule.
The constraints
field defines arrays that map requests to clusters. Currently, the only implemented field is the light
field which is used to determine the Instance to which the live request will be sent and from which the response will be sent to the caller.
Currently, the constraints
field must set a light
field that contains an array of .