Ring Hash
Routes requests to a stable backend by hashing a configurable request header through a sorted virtual-node ring
Versions marked “overview” do not contain this page. Selecting one opens that version’s documentation overview.
Category: Practical
Task: Routes requests to a stable backend by hashing a configurable request header through a sorted virtual-node ring
Prerequisites: The product runtime and any backend services referenced by this configuration.
Run it: Use ghcr.io/praxis-proxy/praxis:0.7.2 and follow the first reverse-proxy tutorial to mount and start the configuration.
This configuration comes from the selected release. The example has not been run here; external services are not bundled.
Download the source file.
# Ring Hash Load Balancing
#
# Routes requests to a stable backend by hashing a configurable request
# header through a sorted virtual-node ring. Compared to basic consistent
# hash, ring hash offers pluggable hash functions (fnv1a, xxhash, murmur3)
# and tunable virtual node density for better distribution uniformity.
#
listeners:
- name: default
address: "127.0.0.1:8080"
filter_chains:
- main
filter_chains:
- name: main
filters:
- filter: router
routes:
- path_prefix: "/"
cluster: backend
- filter: load_balancer
clusters:
- name: backend
load_balancer_strategy:
ring_hash:
header: "X-Session-Id"
hash_function: xxhash
virtual_nodes: 150
endpoints:
- "127.0.0.1:3001"
- "127.0.0.1:3002"
- "127.0.0.1:3003"
insecure_options:
allow_private_endpoints: true # example proxies to local backends