[ejabberd] Dealing with big rosters

Evgeny Khramtsov xramtsov at gmail.com
Mon Jan 8 14:03:38 MSK 2018

Mon, 8 Jan 2018 02:18:18 -0800
Gregory Makarov <gmakarov at gmail.com> wrote:

> 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?

There is no such extension.
However, you may not send initial presence-broadcast (<presence/>), but
instead send direct presences to needed contacts. Since you have
customized XMPP client, this shouldn't be a big problem.

More information about the ejabberd mailing list