The Ejabber server is a highly scalable server which allows upto a million TCP connections at once. In this tutorial, we will see things we need to do to get a lot of concurrent users.
For this example, I am assuming the following:
1. Ejabberd community version
2. Centos machine
3. Amazon EC2 for hosting : m4.2xlarge (32GB, 8 core)
Centos Tuning
The linux machine needs to be tuned for handling a large number of connections.
As seen above, we have increased the number of memory available for each TCP socket. We have also increased the number of open files. (ulimit).
We also need to make sure that network interrupts are handled properly by all CPU cores. In this case we have distributed network interrupts to the first four CPU cores.
Ejabberd server Settings
In addition to above you also need to setup additional network instances for the same machine.
For this example, I am assuming the following:
1. Ejabberd community version
2. Centos machine
3. Amazon EC2 for hosting : m4.2xlarge (32GB, 8 core)
Centos Tuning
The linux machine needs to be tuned for handling a large number of connections.
As seen above, we have increased the number of memory available for each TCP socket. We have also increased the number of open files. (ulimit).
We also need to make sure that network interrupts are handled properly by all CPU cores. In this case we have distributed network interrupts to the first four CPU cores.
* ERL_MAX_PORTS=320000
* ERL_MAX_ETS_TABLES=600000
* ERL_FULLSWEEP_AFTER=0
* POLL=true
* ERL_PROCESSES=2500000
In addition to above you also need to setup additional network instances for the same machine.
0 comments:
Post a Comment
What do you think?.