Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Global settings
- global
- daemon
- pidfile /var/run/haproxy.pid
- stats socket /var/lib/haproxy/stats mode 660 level admin
- stats bind-process 1
- stats timeout 5m
- user haproxy
- group haproxy
- # ssl-default-bind-ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHAC
- # ssl-default-bind-options no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets
- # ssl-default-server-ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CH
- # ssl-default-server-options no-sslv3 no-tlsv10 no-tlsv11 no-tls-tickets
- # log 127.0.0.1:514 local0 notice
- log-tag haproxy-grpc-test
- nbproc 4
- max-spread-checks 1s
- spread-checks 10
- maxconn 262144
- tune.ssl.default-dh-param 2048
- ### Defaults settings
- defaults
- backlog 256
- log global
- mode http
- retries 3
- maxconn 262144
- timeout http-request 10s
- timeout queue 60s
- timeout connect 2s
- timeout client 60s
- timeout client-fin 30s
- timeout server 60s
- timeout http-keep-alive 10s
- timeout check 3s
- # https://www.haproxy.com/blog/haproxy-1-9-2-adds-grpc-support/
- # Before you can use HTTP/2 to a backend, you must add option http-use-htx
- option http-use-htx
- option tcp-smart-accept
- option tcp-smart-connect
- option redispatch
- option dontlognull
- option forwardfor
- option http-server-close
- # option splice-auto
- # option forwardfor
- # option contstats
- option log-health-checks
- balance roundrobin
- default-server error-limit 3 fall 1 rise 1 inter 3s fastinter 1s downinter 2s on-marked-down shutdown-sessions
- ### Stats
- listen stats
- bind 0.0.0.0:9000
- mode http
- # bind-process - WTF?
- bind-process 2
- stats enable
- stats uri /hastat
- stats hide-version
- stats realm Haproxy\ Statistics
- # FE for http, redirect to https
- frontend fe_http
- mode http
- bind *:8000
- # Redirect to https
- redirect scheme https code 301
- # main frontend for gRPC LB
- frontend fe_https
- mode tcp
- bind *:443 npn spdy/2 alpn h2,http/1.1
- default_backend be_grpc
- # use_backend backend_sae_grpc if { base_sub -i sae.msk.vmet.ro }
- # default_backend backend_sae_grpc
- # SAE gRPC servers
- backend be_grpc
- mode tcp
- balance roundrobin
- server msk-aut-core01 10.1.228.3:9001 check
- server msk-aut-core02 10.1.228.67:443 check
Advertisement
Add Comment
Please, Sign In to add comment