Willy, I know you said that HAProxy would work just fine with persistent TCP connections, unfortunately I am not seeing that behavior. We are establishing a socket connection and sending application level "heart beat" messages every 60 seconds. I am seeing that HAProxy is shutting down my connection after a period of time. Attached is a pcap file of the shutdown... from the HAProxy server. I have also included my configuration below.
Any ideas on what's up here?
global
maxconn 4096 # Total Max Connections. This is dependent on
ulimit
daemon
nbproc 4 # Number of processing cores. Dual Dual-core Opteron
is 4 cores for example.
log 127.0.0.1 local0 debug
defaults
mode http
clitimeout 150000
srvtimeout 30000
contimeout 4000
log global
#option tcplog
#option httplog
#option httpclose # Disable Keepalive
listen services X.X.X.131:1312
mode tcp
balance roundrobin # Load Balancing algorithm
option tcpka
retries 3
## Define your servers to balance
server rs-webserver1 X.X.X.217:1312
server rs-webserver2 X.X.X.216:1312
server rs-webserver3 X.X.X.136:1312
server rs-webserver4 X.X.X.220:1312
server rs-webserver5 X.X.X.126:1312
listen stats :8080
mode http
stats uri /
Thanks!
Geoff
On Tue, Mar 9, 2010 at 6:03 PM, Willy Tarreau <[email protected]> wrote:
> On Tue, Mar 09, 2010 at 05:58:07PM -0500, Geoffrey Mina wrote:
> > Great. None of this should be an issue. My application sends it's
> > own keepalive/heartbeat packets every 30-60 seconds. So, it sounds
> > like the timeout will only kick in if there is no activity on the
> > socket, correct? If that's the case, then I'll probably have fairly
> > short timeout settings, to ensure we don't have a bunch of garbage
> > connections up.
>
> yes indeed that's better that way. And it's nice to see that some
> people still think about implementing application level keep-alives !
>
> Willy
>
>
test.pcap
Description: Binary data

