Skip to content

Instantly share code, notes, and snippets.

@phedoreanu
Forked from thpham/haproxy.conf
Last active April 14, 2018 10:03
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 phedoreanu/8010fcaf2ba6266c282db76c6ea389bd to your computer and use it in GitHub Desktop.
Save phedoreanu/8010fcaf2ba6266c282db76c6ea389bd to your computer and use it in GitHub Desktop.
test config haproxy for gRPC loadbalancing
global
tune.ssl.default-dh-param 2048
defaults
timeout queue 1m
timeout client 1m
timeout server 1m
timeout check 5s
timeout connect 10s
frontend http-in
mode tcp
bind *:443 ssl crt /path/to/crt+key+dhparam.pem npn spdy/2 alpn h2,http/1.1
bind *:80 npn spdy/2 alpn h2,http/1.1
default_backend be_grpc
# gRPC servers running on port 8083-8084
backend be_grpc
mode tcp
balance roundrobin
server srv01 127.0.0.1:8083
server srv02 127.0.0.1:8084
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment