-
-
Save pims/5b7b24a5ad62b37bc04c85fd09c1dd6c to your computer and use it in GitHub Desktop.
proxy_protocol: envoy + haproxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
admin: | |
access_log_path: "/dev/stdout" | |
address: | |
socket_address: | |
address: 127.0.0.1 | |
port_value: 9090 | |
static_resources: | |
listeners: | |
- address: | |
socket_address: | |
address: 0.0.0.0 | |
port_value: 10000 | |
listener_filters: | |
- name: "envoy.filters.listener.proxy_protocol" | |
typed_config: {} | |
- name: "envoy.filters.listener.tls_inspector" | |
typed_config: {} | |
per_connection_buffer_limit_bytes: 32768 # 32 KiB | |
filter_chains: | |
- filter_chain_match: | |
server_names: ["localhost","localhost:10000"] | |
transport_socket: | |
name: envoy.transport_sockets.tls | |
typed_config: | |
"@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext | |
common_tls_context: | |
tls_certificates: | |
- certificate_chain: { filename: "out/localhost.crt" } | |
private_key: { filename: "out/localhost.key" } | |
filters: | |
- name: envoy.filters.network.http_connection_manager | |
typed_config: | |
"@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager | |
access_log: | |
name: envoy.access_loggers.file | |
typed_config: | |
"@type": type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog | |
path: /dev/stdout | |
stat_prefix: ingress_http | |
# use_remote_address: true | |
http_filters: | |
- name: envoy.filters.http.router | |
route_config: | |
virtual_hosts: | |
- name: default | |
domains: "*" | |
routes: | |
- match: { prefix: "/" } | |
route: | |
cluster: service_foo | |
idle_timeout: 5s # must be disabled for long-lived and streaming requests | |
clusters: | |
name: service_foo | |
connect_timeout: 1s | |
per_connection_buffer_limit_bytes: 32768 # 32 KiB | |
lb_policy: round_robin | |
type: LOGICAL_DNS | |
dns_lookup_family: V4_ONLY | |
load_assignment: | |
cluster_name: service_foo | |
endpoints: | |
- lb_endpoints: | |
- endpoint: | |
address: | |
socket_address: | |
address: 127.0.0.1 | |
port_value: 7777 | |
# http2_protocol_options: | |
# initial_stream_window_size: 65536 # 64 KiB | |
# initial_connection_window_size: 1048576 # 1 MiB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
maxconn 4096 | |
defaults | |
log global | |
mode http | |
retries 3 | |
option redispatch | |
maxconn 2000 | |
timeout connect 5000 | |
timeout client 50000 | |
timeout server 50000 | |
frontend TestServerTest | |
bind 127.0.0.1:8443 | |
mode tcp | |
default_backend TestServernodes | |
backend TestServernodes | |
mode tcp | |
# Note there is no 'check' after the below line unlike the others as we don't want to send the | |
# healthcheck ("OPTIONS / HTTP/1.0"...) string to the TestServer as it doesn't understand it! | |
server TestServer01 127.0.0.1:10000 send-proxy-v2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment