[jdev] Presence packets bottleneck on huge rosters

Mickael Remond mickael.remond at erlang-fr.org
Thu Dec 9 04:04:59 CST 2004

Bresler, Jonathan wrote:
> Hello,
> Large roster lists on active servers with a number of users are a problem.
> All the more so if the connections are encrypted.  The current jabberd14 code
> (reading, still have jabberd2 and ejabberd to read) sends out <presence> 
> Stanzas immediately.  This can be intense.
> One easy to implement option, that might not twist the RFCs to hard, is to schedule
> The <presence> stanzas over some short time period using the heartbeats that are
> Available in jabberd14 (and presumeably jabberd2 and ejabberd).  

That was one of my thought. I did not know the heartbeat mechanism of 
Jabberd1.4. What are the practical consequences on the XML stream ? I 
mean for example, if you have 500 contacts in your roster, how would the 
server send the presence packets to the destination and how much time 
will it take ?

Another of my thought was to use some kind of message delivery 
scheduler, that would rearrange priority between messages. For example, 
normal messages would be delivered with a higher priority than presence 
packet. The scheduler could also play the role of the heartbeat to 
regulate the number of presence packet sent over an interval of time. I 
did not yet thought of all the implication of this change.

Mickaël Rémond

More information about the JDev mailing list