Skip to content

Instantly share code, notes, and snippets.

@Randommood
Forked from gburd/haproxy.conf
Created October 5, 2012 22:37
Show Gist options
  • Save Randommood/3842874 to your computer and use it in GitHub Desktop.
Save Randommood/3842874 to your computer and use it in GitHub Desktop.
Recommended haproxy settings to balance Riak protobuf and http interfaces (note: WORK IN PROGRESS)
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
maxconn 65536
chroot /var/lib/haproxy
no option httpclose
user haproxy
group haproxy
spread-checks 5
daemon
#debug
#quiet
defaults
log global
option dontlognull
option redispatch
option allbackups
retries 3
maxconn 8192
contimeout 5000
clitimeout 50000
srvtimeout 50000
backend riak_rest_backend
mode http
balance roundrobin
option httpchk GET /ping
option httplog
server riak1 riak1.<FQDN>:8098 weight 1 maxconn 1024 check
server riak2 riak2.<FQDN>:8098 weight 1 maxconn 1024 check
server riak3 riak3.<FQDN>:8098 weight 1 maxconn 1024 check
server riak4 riak4.<FQDN>:8098 weight 1 maxconn 1024 check
frontend riak_rest
bind 127.0.0.1:8098
mode http
option contstats
default_backend riak_rest_backend
backend riak_protocol_buffer_backend
balance leastconn
mode tcp
server riak1 riak1.<FQDN>:8087 weight 1 maxconn 1024 check
server riak2 riak2.<FQDN>:8087 weight 1 maxconn 1024 check
server riak3 riak3.<FQDN>:8087 weight 1 maxconn 1024 check
server riak4 riak4.<FQDN>:8087 weight 1 maxconn 1024 check
frontend riak_protocol_buffer
bind 127.0.0.1:8087
mode tcp
option tcplog
option contstats
default_backend riak_protocol_buffer_backend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment