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?

link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.