3

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:

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

defaults
    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

1 Answers1

4

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.

EEAA
  • 110,608