]> Sergey Matveev's repositories - public-inbox.git/commit
imapd+nntpd: drop timer-based expiration
authorEric Wong <e@80x24.org>
Sat, 16 Oct 2021 01:00:54 +0000 (01:00 +0000)
committerEric Wong <e@80x24.org>
Sat, 16 Oct 2021 01:42:49 +0000 (01:42 +0000)
commita1a8cbab22adec879f97dccd9acfd0c5b2492ba9
tree78647cecb223c4116634fee548de9c075ef574f3
parentf64adbd5e3c35197c1915bca108cdcd81f74f708
imapd+nntpd: drop timer-based expiration

It's needlessly complex and O(n), so it doesn't scale well to a
high number of clients nor is it easy-to-scale with the data
structures available to us in pure Perl.

In any case, I see no evidence of either -imapd nor -nntpd
experiencing high connection loads on public-facing sites.
-httpd has never had its own timer-based expiration, either.

Fwiw, public-inbox.org itself has been running a public-facing
HTTP/HTTPS server with no userspace idle client expiration for
the past 8 years or with no ill effect.  Clients can come and go
as they wish, and SO_KEEPALIVE takes care of truly broken
connections if they're gone for ~2 hours.

Internet connections drop all time, so it should be harmless to
drop connections w/o warning since both NNTP and IMAP protocols
have well-defined semantics for determining if a message was
truncated (as does HTTP/1.1+).
lib/PublicInbox/DS.pm
lib/PublicInbox/Daemon.pm
lib/PublicInbox/HTTP.pm
lib/PublicInbox/IMAP.pm
lib/PublicInbox/NNTP.pm