We have an ejabberd cluster with about 700,000 persistent chat rooms. The problem we are facing is that starting the first node of the cluster takes about 1 hour as the Erlang processes for all the rooms are started on that node.
Even after the cluster is initialized and we have say 4 nodes running, the MUC processes aren't balanced across the nodes. There can be a node using 90% of it's memory and another node using 5%.
Is there a way to start multiple nodes of a cluster at once so that the MUC load is spread evenly from the beginning and the startup is faster?
Can anyone suggest a solution for balancing the MUC processes between the cluster nodes?
The way it works now is obviously not scalable, because as the number of rooms grows, we need more and more RAM on the first node that is started in the cluster and also, the startup time increases.
Many thanks, Alex
In current ejabberd Community Edition there is no such feature. You would need a customized MUC module to match your specific large number of rooms requirement. It is more that load balancing the MUC across the cluster. You need to aggressively optimize for RAM for large scale, at the expense of storage and CPU.