global
  maxconn 2048
  debug
  stats socket /tmp/localhaproxystats

defaults
  mode http
  retries 3
  maxconn 1024
  # specify some timeouts (all in milliseconds)
  timeout connect 5000
  timeout client 50000
  timeout server 50000


########### Riak Configuration ###################
frontend dbcluster
  # We'll be using protocol buffers to talk to
  # Riak, so we will change from the default mode
  # and use tcp instead
  mode tcp
  # we're only interested in allowing connections
  # from internal sources (so that we don't expose
  # ourselves to the web. so we shall only listen
  # on an internal interface on port 8080
  bind 127.0.0.1:9190
  # Default to the riak cluster configuration
  default_backend riaks

backend riaks
  mode tcp
  balance roundrobin
  option httpchk GET /ping
  server Riak1 127.0.0.1:8098 check addr 127.0.0.1 port 8098
  server Riak2 127.0.0.1:8198 check addr 127.0.0.1 port 8198
  server Riak3 127.0.0.1:8298 check addr 127.0.0.1 port 8298
