[ejabberd] How to handle more than 30000 mobile connections on one EC2 large instance ?

Yao Ko koyao at raptr.com
Tue Sep 28 23:29:56 MSD 2010

Hi Vincent,

I noticed a similar problem, but I was using MySQL instead of Mnesia.
After some loadtesting, we found out that the number of ODBC
connections greatly affects the connect time (eg. when the first xml
stanza arrives).

We loadtested odbc_pool_size all the way from 1000 down to 2, and
concurrent login attempts from 8000 to 500 users.  We found out that
the ideal odbc_pool_size was 10 for our setup.  At
odbc_pool_size=1000, the 99th percentile connect time almost doubles
compared to odbc_pool_size=10.

Also, the existing number of connections didn't matter too much.  What
really matters is the number of concurrent login attempts.

Not sure how helpful this is, since you're on Mnesia and not MySQL...


On Tue, Sep 28, 2010 at 10:09 AM, Vincent Barat <vbarat at ubikod.com> wrote:
> Hi everybody,
> We are running 2 eJbaberd 2.1.0 servers on one EC2, large instances (8 GB
> RAM). These 2 servers handle nearly 25000 XMPP connections from mobile
> devices.
> Because we handle mobile device connections, we face the following issue:
> the servers open and close a LOT of connection each second (from 10 to 20)
> because connections are not stable. When we start to reach 20000
> simultaneously connected users, the time eJabberd take to open the incoming
> C2S socket increase until 50s. (i.e. 50s to see this first damned <stream>
> stanza  !). Once the socket has been opened, the signin process itself is
> fast.
> What is interesting to note: the EC2 instance itself is not slow, and
> opening any other incoming socket (e.g. SSH) is FAST.
> So the question is: do you know how to improve the time needed by eJabberd
> to ACCEPT an incoming connection ?
> My configuration:
> Mnesia (I don't think that using SQL would improve, since we don't have any
> roster, but I need some advice here...
> All standard modules have been deactivated. Here is our typical .cfg file:
> {modules,
>  [
>  {mod_adhoc,    []},
>  {mod_configure,[]},
>  {mod_disco,    []},
>  {mod_version,  []}
> ]}.
> We are using  Erlang R13B04 (erts-5.7.5) [source] [64-bit] [smp:2:2] [rq:2]
> [async-threads:0] [kernel-poll:false]
> Thanks for your help
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd

More information about the ejabberd mailing list