xmppejabberdejabberd-module

Ejabberd MUC with more that 5K users


Ejabberd is the massively scalable server, here's article which show Ejabber can supporting 2M+ concurrent user.

But for Multi-User Chat(MUC), Ejabber supports only 5K users(as per ejabberd module code: here). Ejabbered should be able to handle more user than that, so my questions to Ejabberd Gurus out there:

  1. Why Ejabberd impose the limitation to only support 5k Users in MUC?
  2. How to support more than 5K users in the MUC?
  3. Will clustering be able to mitigate this limitation?

Thanks in advance.


Solution

    1. Why Ejabberd impose the limitation to only support 5k Users in MUC?

    Because it makes no sense to have 5000 people sharing their presence with each other, and chatting with all the other 4999.

    1. How to support more than 5K users in the MUC?

    Very simple, just edit the source code and add a 0 to 5000. Recompile, reinstall. But then don't complain if your machine lags. You do this at your own risk.

    1. Will clustering be able to mitigate this limitation?

    No, because each room is handled by a process, and that process lives in a specific machine.

    XEP-0045 (MUC) is not designed to have thousands of chatbots in the same room. It is for people chatting. If you are not having people chatting, use a proper tool for your task, like MucSub, or PubSub...