What equipment do you use? 6,000 connected users seem a bit low. In addition, ejabberd should not fall under load. This may slow down, but not crash.
Something is wrong with your installation.
About node chat replication, it's not easy. Better handle smooth client-side reconnection.
But then again, ejabberd should not fall under such a load, unless something is wrong.
cstar source share