route_query

This escaper allows to select a next escaper based on query to another service through a UDP socket.

There is no path selection support for this escaper.

No common keys are supported.

fallback_node

required, type: metric node name

Set the fallback escaper name.

query_allowed_next

required, type: metric node name

Set all the next escapers those are allowed to use in the query result. Each element should be the next escaper name. If the selected escaper name is not found in this list, the fallback escaper will be used.

query_pass_client_ip

optional, type: bool

Set whether we should also send client_ip in the query message.

default: false

cache_request_batch_count

optional, type: usize

Set how many consequent query requests we should handle in the cache runtime before yield out to the next loop.

default: 10

cache_request_timeout

optional, type: humanize duration

Set how many time we should spend on waiting responses from cache runtime after sending query request.

The fallback node will be used if timeout occur.

default: 100ms

cache_pick_policy

optional, type: selective pick policy

Set the policy to select next proxy address from the query result.

The key for ketama/rendezvous/jump hash is <client-ip>.

default: ketama

query_peer_addr

optional, type: env sockaddr str

Set the socket address of the service that we should send queries to.

default: 127.0.0.1:1053

query_socket_buffer

optional, type: socket buffer config

Set the socket buffer config for the UDP socket we will use.

default: not set

query_wait_timeout

optional, type: humanize duration

Set how many time we should wait for response from the peer service.

Empty reply will be send back to cache runtime if timeout occur.

default: 10s

protective_cache_ttl

optional, type: usize

Set the cache ttl for failed or zero-ttl query results.

default: 10

maximum_cache_ttl

optional, type: usize

Set the maximum cache ttl for query results.

default: 1800

cache_vanish_wait

optional, type: humanize duration

Clean the record from the cache if it has been expired such many time.

We still cache expired records some time before clean them as a new query will spend more time and the new query result will have a big chance to be the same with the expired one.

default: 30s, alias: vanish_after_expire