Is there a way to pack msg when using ejabberd?

Viewed 26

I am testing ejabberd for mucroom. The test client is Tsung. The test condition:

  1. one ejabberd server(4core 16G Ram)
  2. 3000 user join one mucroom
  3. user send a message in 1 minute by random, every user send 5 message The server OS CPU: 90% enter image description here

The result is not up to expectation. I suspect the cause is the server need broadcast too much message.One user send one message, the server need to broadcast to 2999 user. I get the message package with Wireshark and found every message is individual. Is there a way to pack multy message in one package?


Sorry, I make a mistake. The ejabberd already pack some message in one message package. the wireshark screenshot

I believe the ejabberd can take more user in server which have 4Core and 16G Ram. Does any other reason cause the result not up to expectation?

1 Answers

3.000 users in the same room, all of them chatting? Obviously those are not human people, they are machine. Maybe MUC is not the protocol that better suits your usercase. MUC involves checking each room occupant's role and privilege, their presence, etc.

Maybe you should consider Muc/Sub, or PubSub (or MIX), or MQTT

Is there a way to pack multy message in one package?

You could apply this and experiment with it https://github.com/processone/ejabberd/pull/3844 https://github.com/processone/xmpp/pull/63

Related