Skip to content

Instantly share code, notes, and snippets.

@meineerde
Last active August 29, 2015 14:13
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 meineerde/94723bc0d64df9df9997 to your computer and use it in GitHub Desktop.
Save meineerde/94723bc0d64df9df9997 to your computer and use it in GitHub Desktop.
HaProxy speedy split
frontend ssl
bind :443 ssl crt /etc/haproxy/crts npn spdy/2,http/1.1
mode tcp
use_backend speedy if { ssl_fc_npn -m str spdy/2 }
default_backend http
frontend http_internal
bind 127.0.0.1:8443
mode http
# do whatever you like with the http part
# ...
backend http
mode tcp
server http_internal 127.0.0.1:8443
backend speedy
# makes unencrypted connections using speedy protocol
mode tcp
server speedy_1 10.0.0.1:80
server speedy_2 10.0.0.2:80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment