[Standards] Use of XEP-0198 resumption under adverse network conditions

Holger Weiß holger at zedat.fu-berlin.de
Thu Nov 5 10:32:42 UTC 2020

* Thilo Molitor <thilo at eightysoft.de> [2020-11-05 10:11]:
> > Our proposal is that when a session is found to be unresponsive, the server
> > starts sending push notifications for unacknowledged (and future) messages,
> > but otherwise leaves the session live when resumable. Only after a
> > significantly longer timeout should the TCP session be terminated (and at
> > that point destroy the session entirely).
> Like Marvin explained, prosody already does something like this.
> The default setting for `smacks_max_ack_delay` is 30 seconds [1].
> A push will be generated if an ack is pending for more than 30 seconds and the 
> outgoing XEP-0198 queue is not empty.
> Every new stanza added to the queue while the timeout expired will generate an 
> additional push.
> The standard TCP timeout of prosody is usually much higher --> standard 
> prosody seems to already follow your suggestions pretty well :)
> Not sure how ejabberd handles this, though.

The TCP connection is explicitly closed if if an ACK request times out.
Initially, ejabberd didn't do that.  We ran into issues with keeping the
connection open in this state, but that was 5 years ago and I can hardly
remember the details of issues I ran into 5 weeks ago, sigh ...


More information about the Standards mailing list