[Standards] Stanza Size Limits (was Re: [jdev] Communicate between two client instances of the same ID)

Justin Karneges justin-keyword-jabber.093179 at affinix.com
Wed Sep 3 21:03:53 UTC 2008

On Wednesday 03 September 2008 13:24:00 Pedro Melo wrote:
> On Sep 3, 2008, at 8:29 PM, Justin Karneges wrote:
> > This is more of a server limit though.  The client still needs a
> > way to
> > negotiate its own limit, and have the server protect the client
> > from stanzas
> > larger than that limit.
> ehe, Firewall XEP :).
> What if your own server breaks that limit, for example, sending you
> the roster? Peter would be in trouble... :)

A hackish approach would be to make the roster iq-result exempt from limits.  
Long term, it's probably more appropriate to make the roster get sent as 
multiple stanzas if we wish to live by our "stanzas should be small" motto.

> Servers already have Max stanza size on C2S and S2S. Do we really
> need more protection than that?

If you set a small value for the server policy then you'd be fine, but that's 
not very flexible.  For example, most desktop clients are surely capable of 
handling a 1MB stanza, but for some reason you cap your server at a much 
smaller 64KB.  And even 64KB is probably too much for a mobile.  So a flat 
maximum is not ideal.

> Each time we had a error back to the sender, we increase complexity on all
> the clients. And some stanzas are really hard to break in two...

Sure, but you already have this problem with server-imposed limits.  The fact 
is, we have these limits, because we believe stanzas should be of some 
reasonable size.  All of our XEPs that may return large data must have a way 
of being split.  That's just a fact of life.


More information about the Standards mailing list