Skip to content

Instantly share code, notes, and snippets.

@sgirones
Created May 29, 2018 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgirones/e3874793899eb135ced97d81a084b234 to your computer and use it in GitHub Desktop.
Save sgirones/e3874793899eb135ced97d81a084b234 to your computer and use it in GitHub Desktop.
TCP Network balancer using Envoy
admin:
access_log_path: /dev/null
address:
socket_address: { address: 127.0.0.1, port_value: 8001 }
static_resources:
listeners:
- name: listener1
address:
socket_address: { address: 0.0.0.0, port_value: 443 }
filter_chains:
- filters:
- name: envoy.tcp_proxy
config:
stat_prefix: ingress1
cluster: cluster1
access_log:
name: envoy.file_access_log
config:
path: "/var/log/envoy/envoy-cluster1.log"
max_connect_attempts: 3
clusters:
- name: cluster1
connect_timeout: 0.25s
type: EDS
eds_cluster_config:
eds_config:
path: ./envoy-eds-cluster1.yaml
lb_policy: ROUND_ROBIN
health_checks:
- timeout: 1s
interval: 1s
no_traffic_interval: 1s
interval_jitter: 0.1s
unhealthy_threshold: 2
healthy_threshold: 2
tcp_health_check: {}
version_info: "0"
resources:
- "@type": type.googleapis.com/envoy.api.v2.ClusterLoadAssignment
cluster_name: cluster1
endpoints:
- priority: 0
lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 8443
- priority: 1
lb_endpoints:
- endpoint:
address:
socket_address:
address: failover-ip
port_value: 443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment