There is a brief time between the switchover from the old process to the
new where new connections can not be accepted.  Better to mark the backend
servers down without switching processes.  (Several ways to do that).



If the refused connection concerns you, and you can’t avoid starting
haproxy, one option is to put up a firewall rule to block syn packets
while haproxy reloads, and then unblock.  That way clients will retry the
connection in about 3 seconds instead of being refused.







From: Mahawar, Manisha (contractor)
[mailto:[email protected]]
Sent: Thursday, January 12, 2012 5:03 PM
To: [email protected]
Subject: Need help with HAProxy



I am using HAProxy on RedHat 5.5 and have below configuration.

global
    daemon
    maxconn 1024
    log  127.0.0.1  local1 info

defaults
    log global
    balance roundrobin
    mode http
    retries    3
    option redispatch
    timeout connect 300000ms
    timeout client  300000ms
    timeout server  300000ms

listen epgs
    bind *:80
    server server1 127.0.0.1:8080 maxconn 1 check
    server server2 epg.local.com:8080 maxconn 1 check
    stats uri /stats

I started firing 5000 request to HAProxy using JMeter. While JMeter is
firing the request I removed the server2 from configuration file and fired
"haproxy -f /etc/haproxy.cfg -p /var/run/haproxy.pid -sf $(cat
/var/run/haproxy.pid) command. I noticed 2 connection refused errors in
JMeter log.

2012/01/11 03:31:31 ERROR - jmeter.protocol.http.sampler.HTTPJavaImpl:
readResponse:  java.net.ConnectException: Connection refused
2012/01/11 03:31:31 ERROR - jmeter.protocol.http.sampler.HTTPJavaImpl:
readResponse: java.net.ConnectException: Connection refused
2012/01/11 03:31:31 ERROR - jmeter.protocol.http.sampler.HTTPJavaImpl:
Cause: java.net.ConnectException: Connection refused
2012/01/11 03:31:31 ERROR - jmeter.protocol.http.sampler.HTTPJavaImpl:
Cause: java.net.ConnectException: Connection refused

Do you know which configuration I should use to make HAProxy not drop any
request and am i verifying it correctly too?

Thanks for your help in advance.

Manisha





  _____

This E-mail and any of its attachments may contain Time Warner Cable
proprietary information, which is privileged, confidential, or subject to
copyright belonging to Time Warner Cable. This E-mail is intended solely
for the use of the individual or entity to which it is addressed. If you
are not the intended recipient of this E-mail, you are hereby notified
that any dissemination, distribution, copying, or action taken in relation
to the contents of and attachments to this E-mail is strictly prohibited
and may be unlawful. If you have received this E-mail in error, please
notify the sender immediately and permanently delete the original and any
copy of this E-mail and any printout.

Reply via email to