[ejabberd] Dealing with big rosters

Gregory Makarov gmakarov at gmail.com
Mon Jan 8 13:18:18 MSK 2018


Hi,

Let's assume we have a big organization with 5000 people working on
it. Each employee has our proprietary XMPP client (it's more than XMPP
client in fact, but it doesn't matter here) installed on his computer
(and probably mobile client installed on his smartphone). That client
has a roster with all the company contacts in it. So, we have a roster
with 5000 elements in it. When someone changes their presence,
Ejabberd sends presence stanza to all the available clients. As far as
I understand, there is no standard way for the client to block that
presence stanza on XMPP server if that particular client is not
interested in it (for example, that contact is not displayed in the
roster window at that moment). I was very surprised that there is no
XMPP extension like "roster window". How it could be implemented:
after establishing a session, a client may send special IQ SET stanza
to inform the server that it needs presence information only for
particular JIDs. When different or additional contacts become visible
in the client's roster (user scrolled the contact list or app window
size changed) it will send that IQ SET stanza again with a new JID
list.  Are we the only people who need this or we are doing something
wrong?

It looks like I cannot reply to my previous thread (Ejabberd shared
roster performance) because I used the digest mode. So, we are using
MySQL (in fact, Percona XtraDB Cluster) for mod_mam and mnesia for
everything else and we also don't have any special or disabled groups.
Raoul, thank you for your help, I'll try your solution.

Thank you,
Grigory


More information about the ejabberd mailing list