Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Anthonyhawkins/175f5b32259608c813547fb9edd7fea8 to your computer and use it in GitHub Desktop.
Save Anthonyhawkins/175f5b32259608c813547fb9edd7fea8 to your computer and use it in GitHub Desktop.
Envoy TCP load balancer - chat GTP
static_resources:
listeners:
- name: listener_8000
address:
socket_address:
address: 0.0.0.0
port_value: 8000
filter_chains:
- filters:
- name: envoy.filters.network.tcp_proxy
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy
stat_prefix: tcp_proxy_8000
cluster: backend_servers
clusters:
- name: backend_servers
connect_timeout: 0.25s
type: STATIC
lb_policy: ROUND_ROBIN
load_assignment:
cluster_name: backend_servers
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: server1.example.com
port_value: 8000
- endpoint:
address:
socket_address:
address: server2.example.com
port_value: 8000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment