Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am stress testing ejabberd with Tsung. My EC2 instances setup as follows:

  • Tsung : c3.xlarge
  • ejabberd : c3.2xlarge
  • HAProxy : t1.mirco

When I let Tsung talk to the ejabberd instance directly, I easily get my intended 35K+ connections within 5 mins. When I throw HAProxy between the two of them, then I get ~10K max connections. No HAProxy error logs, CPU runs 9%, Mem is 18% usage on the HAProxy instance. The ulimit is set properly on the instance. Is there perhaps something obviously that I am missing here? Any advice most welcome.

My HAProxy config as follows:

    log local1 notice
    log local0 notice
    maxconn 512000
    user haproxy
    group haproxy

    log     global
    mode    tcp
    option  tcplog
    option  dontlognull
    retries 3
    option redispatch
    #timeout connect  5000
    #timeout client  10000
    #timeout server  10000
    timeout connect  5s
    timeout client  24h
    timeout server  24h

listen stats :80
    mode http
    stats enable
    stats uri /haproxy?stats
    stats realm Strictly\ Private
    stats auth xx:xx

listen ejabberd_proxy :5222
    maxconn 512000
    mode    tcp
    retries 2
    option redispatch
    option tcplog
    option tcpka
    option clitcpka
    option srvtcpka
    balance leastconn
    server ejabberd1 ip_1:5222 check fall 10
    server ejabberd2 ip_2:5222 check fall 10
share|improve this question
up vote 3 down vote accepted

Try a larger instance size for your haproxy node. t1.micro instances have horrible network and IO performance, and I wouldn't be surprised if one if those were causing the problem.

share|improve this answer
Will do a c3.xlarge instance type for the HAProxy instance quickly and see what goes. – 0v3rst33r Jun 10 '14 at 23:35
It was exactly that! Lesson learned: stay away from EC2 t1.micro instances for this type of load testing. I should have thought about that earlier seeing that I ended up with bigger instances for the Tsung and ejabberd boxes. Thanks again for just pointing out the horrible nature of t1.micro for anything that needs a bit of power behind it. – 0v3rst33r Jun 10 '14 at 23:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.