NNTP COMPRESS clients? RFC 8054

Julien ÉLIE julien at trigofacile.com
Sat Jul 13 13:55:08 UTC 2019

Hi Eric,

> I've prepared a patch to the
> Perl Net::NNTP module and am hoping I got everything right...
> I've only lightly tested it against news.gmane.org which runs inn:
>    https://rt.cpan.org/Ticket/Display.html?id=129967

I've just taken the time to have a look at it.  A few comments below:

+	LINE_MAX => 512, # RFC 977 section 2.3

Now "RFC 3977 Section 3.1" :)

+	$err == Z_OK or die "Failed to initialize zlib deflate stream: $err";

Shouldn't a 403 response code be offered?  The connection then goes on, 

+# RSS usage for 10K idle-but-did-something NNTP clients on 64-bit:
+#   TLS + DEFLATE :  1.8 GB  (MemLevel=9, 1.2 GB with MemLevel=8)
+#   TLS only      :  <200MB
+#   plain         :   <50MB

How did you test those 10k connections?  (with your test suite 

+	# nnrpd (INN) and Compress::Raw::Zlib favor MemLevel=9,
+	# but the zlib C library and git use MemLevel=8
+	# as the default.  Using 8 drops our memory use with 10K
+	# TLS clients from 1.8 GB to 1.2 GB, but...
+	# FIXME: sometimes clients fail with 8, so we use 9
+	# -MemLevel => 9,

Strange that clients fail with mem level 8.  Seems like a bug with such 
Hopefully nnrpd uses mem level 9 anyway.

+	# Net::NNTP emit different line-endings depending on TLS or not...:
+	$data =~ tr/\r//d;

Shouldn't it be fixed in Net::NNTP?

> I also implemented it server-side in public-inbox-nntpd[1],
> which powers news.public-inbox.org, but there's a danger I'm
> implementing something wrong on both ends in that case :x

Time to implement it in nntp.perl.org then :)
It runs Colobus, an NNTP news server written in Perl by Ask Bjørn Hansen.

> Thanks for reading and all your work on inn!

You're welcome!

Julien ÉLIE

« Qui joue des flûtes perd sa hutte ! » (Mme Agecanonix)

More information about the inn-workers mailing list