Skip to main content
Version: 3.0.0-beta

APISIX variable

Description#

Besides NGINX variable, APISIX also provides additional variables.

List of variables#

Variable NameOriginDescriptionExample
balancer_ipcoreThe IP of picked upstream server.192.168.1.2
balancer_portcoreThe port of picked upstream server.80
consumer_namecoreUsername of Consumer.
graphql_namecoreThe operation name of GraphQL.HeroComparison
graphql_operationcoreThe operation type of GraphQL.mutation
graphql_root_fieldscoreThe top level fields of GraphQL.["hero"]
mqtt_client_idmqtt-proxyThe client id in MQTT protocol.
route_idcoreId of Route.
route_namecoreName of Route.
service_idcoreId of Service.
service_namecoreName of Service.
redis_cmd_lineRedisThe content of Redis command.
rpc_timexRPCTime spent at the rpc request level.

You can also register your own variable.