Tcp Consistent Hash
TCP consistent-hash load balancing (client IP affinity)
Category: Practical
Task: TCP consistent-hash load balancing (client IP affinity)
Prerequisites: The product runtime and any backend services referenced by this configuration.
This configuration comes from the selected release. The example has not been run here; external services are not bundled.
Download the source file.
# TCP consistent-hash load balancing (client IP affinity).
#
# Usage:
# cargo run -p praxis-proxy -- -c examples/configs/protocols/tcp-consistent-hash.yaml
listeners:
- name: cache
address: "127.0.0.1:6379"
protocol: tcp
cluster: cache_pool
filter_chains: [tcp_lb]
clusters:
- name: cache_pool
endpoints:
- "127.0.0.1:16379"
- "127.0.0.1:16380"
- "127.0.0.1:16381"
load_balancer_strategy:
consistent_hash: {}
insecure_options:
allow_private_endpoints: true
allow_private_upstreams: true
filter_chains:
- name: tcp_lb
filters:
- filter: tcp_load_balancer
clusters:
- name: cache_pool
endpoints:
- "127.0.0.1:16379"
- "127.0.0.1:16380"
- "127.0.0.1:16381"
load_balancer_strategy:
consistent_hash: {}