Re: Loadbalancing TCP connections

From: Chris Sarginson <chris#sargy.co.uk>
Date: Wed, 19 May 2010 11:10:34 +0100


In response to my own question, I have the following in my haproxy.cfg:

global

         log 127.0.0.1   local0 info
         log 127.0.0.1   local1 notice
         #log loghost    local0 info
         maxconn 40000
         chroot /var/lib/haproxy
         user haproxy
         group haproxy
         daemon
         #debug
         #quiet
         stats socket /tmp/stats

defaults
         log     global
         mode    http
         option  httplog
         option  forwardfor
         option  allbackups
         option  dontlognull
         retries 3
         option redispatch
         maxconn 5000
         contimeout      5000
         clitimeout      50000
         srvtimeout      50000
         option  httpchk
         option  httpclose
         # enable web-stats at /haproxy?stats

backend 5220_sphinx
balance leastconn
mode tcp

         contimeout      50000
         srvtimeout      50000

server sphinx1 172.31.252.170:3312 check inter 3000 rise 2 fall 2 weight 1 server sphinx2 172.31.252.171:3312 check inter 3000 rise 2 fall 2 weight 1

Running a tcpdump on the server I can see that this is attempting to send HTTP requests to check if the backend is up - is this because of the defaults settings? If so, is there any way to override this?

Cheers
Chris

Chris Sarginson wrote:
> Hi all,
>
> I'm currently trying to loadbalance connections to the Sphinx search
> daemon on 2 servers, however haproxy is not detecting the ports as being
> accessible despite the fact that they are responding.
>
> I'm using haproxy 1.3.23 - what sort of checks is haproxy running to try
> and ascertain if the services are available?
>
> Information on sphinx is available here: http://www.sphinxsearch.com/
>
> Cheers
> Chris
Received on 2010/05/19 12:10

This archive was generated by hypermail 2.2.0 : 2010/05/19 12:15 CEST