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

Peter Saint-Andre stpeter at stpeter.im
Wed Sep 3 14:13:29 UTC 2008


Pedro Melo wrote:
> 
> On Sep 3, 2008, at 5:47 AM, Peter Saint-Andre wrote:
> 
>> Justin Karneges wrote:
>>> Dragging this over from jdev:
>>>>>> Hmm. XMPP is not optimized for sending around 100k+ messages.
>>>>> Would 64KB chunks a reasonable thing to do?
>>>> That's probably still too high.  There is currently no specified 
>>>> maximum
>>>> size for XMPP stanzas, but individual implementations may enforce 
>>>> different
>>>> values.  The original jabberd 1.0 server had around a 10KB maximum.  
>>>> The
>>>> general consensus is that stanzas should be "small", and this is 
>>>> largely in
>>>> part because large stanzas block transmission of other stanzas (you 
>>>> cannot
>>>> send many stanzas in parallel over one stream).
>>> Right now it's fuzzy as to how small you should chunk your data for 
>>> maximum compatibility.  I think we should define the largest stanza 
>>> size that must be supported by clients and servers.  We could just 
>>> make this value 10000 bytes, from the opening '<' to the final '>' of 
>>> the stanza.  The text should go into RFC 3920bis as a SHOULD.
>>> This way, stanzas 10000 bytes or smaller are guaranteed to succeed in 
>>> transmission.  Stanzas larger than 10000 bytes would still be 
>>> transmittable, but without any guarantees that the other side will 
>>> accept it (which is not any worse than the situation today).
>>> A question: which stanza error are we supposed to use to reject a 
>>> stanza that is too large?  Such an error would be very useful to 
>>> determine the MTU.
>>
>> http://www.xmpp.org/extensions/inbox/stanzalimits.html
> 
> Why not make section 3 a stream feature instead?
> 
> Like:
> 
> <stream:features>
>   <limits xmlns='urn:xmpp:tmp:stanza-limits'>
>     <size>65355</size>
>     <rate>10</rate>
>   </limits>
> </stream:features>
> 
> This would signal the client that the max stanza size is 65355 bytes, 
> and the max allowed rate of stanzas per second is 10.

I like that.

/psa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 6751 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.jabber.org/pipermail/standards/attachments/20080903/8398ef3f/attachment.bin>


More information about the Standards mailing list