Parameters
See plugin common configurations for configuration options available to all plugins.
rules
An array of one or more pairs of matching conditions and actions to be executed.
match
Rules to match for conditional traffic split.
vars
An array of one or more matching conditions in the form of APISIX expressions to conditionally execute the plugin.
weighted_upstreams
List of upstream configurations.
upstream_id
ID of the configured upstream object.
weight
Relative share of traffic sent to this entry in
weighted_upstreams.upstream
Inline upstream configuration. Only
name,type,hash_on,key,nodes,timeout,scheme,pass_host, andupstream_hostare applied.To use health checks, retries, TLS settings, keepalive pools, warm-up, service discovery, or other upstream options, create an upstream object and set
upstream_id.type
vaild vaule:
roundrobin,chash,ewma, orleast_connLoad-balancing algorithm used to select a node within this inline upstream. Use
roundrobinfor weighted round robin,chashfor consistent hashing,ewmafor exponential weighted moving average, andleast_connfor least connections. The parentweightfield controls the traffic share assigned to this upstream.hash_on
vaild vaule:
vars,header,cookie,consumer, orvars_combinationsUsed when
typeischash. Support hashing on built-in variables, header, cookie, consumer, or a combination of built-in variables.key
Used when
typeischash. Whenhash_onis set toheaderorcookie,keyis required. Whenhash_onis set toconsumer,keyis not required as the consumer name will be used as the key automatically.scheme
vaild vaule:
API7 Gateway:
httporhttps
APISIX:httporhttps; APISIX 3.19.0 and later also supportwsandwssProtocol used to communicate with the inline upstream. To use another protocol, create an upstream object and set
upstream_id.nodes
Addresses of the upstream nodes.
timeout
Timeout in seconds for connecting, sending and receiving messages.
pass_host
vaild vaule:
pass,node, orrewriteMode deciding how the host name is passed.
passpasses the client's host name to the upstream.nodepasses the host configured in the node of the upstream.rewritepasses the value configured inupstream_host.upstream_host
Used when
pass_hostisrewrite. Host name of the upstream.name
Identifier for the upstream for specifying service name, usage scenarios, and so on.