Saturday, February 26, 2011

HAProxy Quickstart w/ full example config file

3 comments:

  1. Hi Chase,

    your config is smart, but there are still some possible improvements. First, you can use "option http-server-close" instead of "option httpclose". This will still maintain keep-alive with the client but not with the server. That may also allow you to merge your two static backends.

    Also, you can use a "maxconn" value on each application server, in order to ensure that you never go beyond that value even if the servers experience slowdowns or if the traffic suddenly rises. Excess requests will be queued and serially delivered (just like a connection pool). You will have to set a "timeout queue" for this, because by default it equals the "timeout connect" which is a bit low.

    ReplyDelete
  2. Good tips. Thanks! It looks like "http-server-close" is not supported on 1.3.22, which is what I'm running. Sounds like a good reason up upgrade to 1.4

    ReplyDelete
  3. I updated the config file with Willy's changes, which do require 1.4

    ReplyDelete