🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
14 messages
14 total messages Started by Kevin Bowling Fri, 27 Nov 2026 11:28
RFC: Open sourcing csiph-web
#93151
Author: Kevin Bowling
Date: Fri, 27 Nov 2026 11:28
47 lines
3454 bytes
Hi,

In the announcement of csiph.com -- <10t2kh8$1a6i$1@csiph.com> or 
https://csiph.com/group/news.software.nntp/t/10t2kh8%241a6i%241@csiph.com 
-- I mentioned eventually desiring to open sourcing this code.

Before doing this, I want to gauge interest to help me decide if and how:
1) How would you envision using it
2) Do you have any desire to develop it

One of the challenges was figuring out how to scale the front end, 
csiph-web, and the backend -- inn in my case -- to handle the sheer 
volume of bot traffic.  I want the site to be usable on retro PCs, so 
there is no javascript proof of work or anything like that.  Instead, 
there is a robots.txt and if it is ignored there is a rate limiter that 
sends HTTP 429 while in the penalty box.  There is also a subnet penalty 
box for malicious bots like Meta/Facebook.  There are separate limits 
for authed users and certain endpoints.

Without consideration, if you deployed it on the open web to a random 
NNTP server or your own, it would likely DoS the NNTP server.  The 
biggest expense is article threading due to large thread windows and 
bots not doing linear (cache friendly) sweeps.  I currently solve this 
with a large amount of RAM set aside for caching article threading and 
the ability to park/wait requests to similar ranges while article 
threads are being built.  I have some ideas on how I want to make it 
better but ideally I wanted to extend inn[1] and NNTP to handle thread 
roots.  If you turn off threading (flat mode) these problems mostly 
disappear.  All of this gives me a little pause to simply publish what I 
currently have, although if threading defaults to off maybe it is not a 
significant worry.

I don't have a specific timeline for this but probably early in 2027.  I 
spent an obscene amount of money on used DDR4 RAM so I can build a newer 
server to accept Jesse's full usenet archive, and I want to make sure 
things scale fully while generalizing any site specific code.

[1] There is no particular reason it has to happen on the nntp server, 
but it is ideal as the server can keep the thread index up to date with 
every new article submission.  Alternatively, a csiph-web owned thread 
index would solve the same problem with some minor tradeoffs like having 
to index everything the same way the FTS (Full Text Search) 
functionality does.  FTS would benefit for the same reason being server 
side, but that would be a bigger project.

Regards,
Kevin
Re: RFC: Open sourcing csiph-web
#93155
Author: Colin Macleod
Date: Fri, 27 Nov 2026 14:56
41 lines
3849 bytes
Kevin Bowling <kevin.bowling@kev009.com> posted:
> 
> Without consideration, if you deployed it on the open web to a random 
> NNTP server or your own, it would likely DoS the NNTP server.  The 
> biggest expense is article threading due to large thread windows and 
> bots not doing linear (cache friendly) sweeps.

Perhaps you might be interested in how I do threading on newsgrouper.org?
This runs on a fairly modest home PC - 8 logical cores, 32GB ram, 1TB ssd
for the overview database.  I don't run my own nntp server.

I pull XOVER data from three different remote nntp servers on demand and
load this into an "over" table in a Sqlite database.  The schema can be
seen at
https://chiselapp.com/user/cmacleod/repository/newsgrouper/file?ci=tip&name=scripts/db_create.tcl&ln=17-21
Here I have a field "prev" which is the message-id of the last entry in the
References header, which is usually the message being replied to, if any.
There are indexes on this "prev" field and the actual "msgid", combined with
a group identifier.

I can then use recursive SQL queries to follow these msgid/prev pointers
to pull out a single thread:
https://chiselapp.com/user/cmacleod/repository/newsgrouper/file?ci=tip&name=news_code.tcl&ln=2879-2886
or all the threads in a time range:
https://chiselapp.com/user/cmacleod/repository/newsgrouper/file?ci=tip&name=news_code.tcl&ln=2889-2900

I still need to chase these pointers between the records in memory to build
the thread tree structure, but that's quite fast:
https://chiselapp.com/user/cmacleod/repository/newsgrouper/file?ci=tip&name=news_code.tcl&ln=2907-3027

I find this works well, with quite quick response and no great load on the
machine.  I do have various bot defence measures also, and perhaps fewer
user than you.

-- 
Colin Macleod ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ https://cmacleod.me.uk
BLACK FRIDAY - 50% Extra Signature Free!!!

AI Bros: All your bits are belong to us!

FEED GAZA NOW!  SAVE GAZA NOW!  HOUSE GAZA NOW!  FEED GAZA NOW!
Re: RFC: Open sourcing csiph-web
#93156
Author: Kevin Bowling
Date: Fri, 27 Nov 2026 15:08
40 lines
3217 bytes
On 11/27/26 7:56 AM, Colin Macleod wrote:
> Kevin Bowling <kevin.bowling@kev009.com> posted:
>>
>> Without consideration, if you deployed it on the open web to a random
>> NNTP server or your own, it would likely DoS the NNTP server.  The
>> biggest expense is article threading due to large thread windows and
>> bots not doing linear (cache friendly) sweeps.
> 
> Perhaps you might be interested in how I do threading on newsgrouper.org?
> This runs on a fairly modest home PC - 8 logical cores, 32GB ram, 1TB ssd
> for the overview database.  I don't run my own nntp server.
> 
> I pull XOVER data from three different remote nntp servers on demand and
> load this into an "over" table in a Sqlite database.  The schema can be
> seen at
> https://chiselapp.com/user/cmacleod/repository/newsgrouper/file?ci=tip&name=scripts/db_create.tcl&ln=17-21
> Here I have a field "prev" which is the message-id of the last entry in the
> References header, which is usually the message being replied to, if any.
> There are indexes on this "prev" field and the actual "msgid", combined with
> a group identifier.
> 
> I can then use recursive SQL queries to follow these msgid/prev pointers
> to pull out a single thread:
> https://chiselapp.com/user/cmacleod/repository/newsgrouper/file?ci=tip&name=news_code.tcl&ln=2879-2886
> or all the threads in a time range:
> https://chiselapp.com/user/cmacleod/repository/newsgrouper/file?ci=tip&name=news_code.tcl&ln=2889-2900
> 
> I still need to chase these pointers between the records in memory to build
> the thread tree structure, but that's quite fast:
> https://chiselapp.com/user/cmacleod/repository/newsgrouper/file?ci=tip&name=news_code.tcl&ln=2907-3027
> 
> I find this works well, with quite quick response and no great load on the
> machine.  I do have various bot defence measures also, and perhaps fewer
> user than you.
> 

If I understand correctly your thread window is 500?  That would be fast 
for most servers.  For arbitrary reasons (usenet discussions can span a 
long time range) I currently do 10000, which creates a huge amount of 
OVER work for inn.
Re: RFC: Open sourcing csiph-web
#93157
Author: Marco Moock
Date: Fri, 27 Nov 2026 15:28
21 lines
1712 bytes
Am 27.11.26 um 12:28 schrieb Kevin Bowling:
> In the announcement of csiph.com -- <10t2kh8$1a6i$1@csiph.com> or 
> https://csiph.com/group/news.software.nntp/ 
> t/10t2kh8%241a6i%241@csiph.com -- I mentioned eventually desiring to 
> open sourcing this code.
> 
> Before doing this, I want to gauge interest to help me decide if and how:
> 1) How would you envision using it
> 2) Do you have any desire to develop it

I think about running it on a publicly reachable machine. Is it possible 
to use it with apache (maybe with it as reverse-proxy), so I can install 
a proof of work captcha etc.

How much resources does it need?

-- 
Gruß
Marco

Spam bitte an abfallentsorgung24@stinkedores.dorfdsl.de
Re: RFC: Open sourcing csiph-web
#93158
Author: Colin Macleod
Date: Fri, 27 Nov 2026 16:56
37 lines
3689 bytes
Kevin Bowling <kevin.bowling@kev009.com> posted:
> 
> If I understand correctly your thread window is 500?  That would be fast 
> for most servers.  For arbitrary reasons (usenet discussions can span a 
> long time range) I currently do 10000, which creates a huge amount of 
> OVER work for inn.

I forgot to explain that the "over" database table has been preloaded with
the entire group history, for some groups back to the 1980s. I just pull in
*new* XOVER data to bring it up-to-date when someone reads that group. The
full db is around 660GB.

Then there are two cases of query:
When "sought" is not set we have a window of 500 (postbatch) but those
are just the starting points, the sql query pulls in any earlier posts
referenced from those, and so on recursively to complete all those threads
even if they go back for years.

When "sought" is set we are completing the thread structure for an
individual post which has been found by a historical search.  In this
case the sql query starts from that one post and follows the msgid/prev
links recursively backwards AND forwards to find all posts in that thread.

Of course preloading the database takes quite some time, but once that's
done the load on the nntp servers is minimal.  The recursive sql queries
are tricky to get right, but very powerful once you get the hang of them.
I also had to run Sqlite's `PRAGMA optimize` a few times to make sure the
correct indexes were being used.  Without that it was horribly slow, with
the right optimization it became incredibly fast.

-- 
Colin Macleod ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ https://cmacleod.me.uk
BLACK FRIDAY SPECIAL DEAL - 50% Extra Signature Free!

RESISTANCE IS FUTILE! - ok, what about inductance?

FEED GAZA NOW!  SAVE GAZA NOW!  HOUSE GAZA NOW!  FEED GAZA NOW!
Re: RFC: Open sourcing csiph-web
#93159
Author: Kevin Bowling
Date: Fri, 27 Nov 2026 20:54
35 lines
2992 bytes
On 11/27/26 9:56 AM, Colin Macleod wrote:
> Kevin Bowling <kevin.bowling@kev009.com> posted:
>>
>> If I understand correctly your thread window is 500?  That would be fast
>> for most servers.  For arbitrary reasons (usenet discussions can span a
>> long time range) I currently do 10000, which creates a huge amount of
>> OVER work for inn.
> 
> I forgot to explain that the "over" database table has been preloaded with
> the entire group history, for some groups back to the 1980s. I just pull in
> *new* XOVER data to bring it up-to-date when someone reads that group. The
> full db is around 660GB.

Thanks for clarifying, that is helpful including the total sizing.

> Then there are two cases of query:
> When "sought" is not set we have a window of 500 (postbatch) but those
> are just the starting points, the sql query pulls in any earlier posts
> referenced from those, and so on recursively to complete all those threads
> even if they go back for years.
> 
> When "sought" is set we are completing the thread structure for an
> individual post which has been found by a historical search.  In this
> case the sql query starts from that one post and follows the msgid/prev
> links recursively backwards AND forwards to find all posts in that thread.
> 
> Of course preloading the database takes quite some time, but once that's
> done the load on the nntp servers is minimal.  The recursive sql queries
> are tricky to get right, but very powerful once you get the hang of them.
> I also had to run Sqlite's `PRAGMA optimize` a few times to make sure the
> correct indexes were being used.  Without that it was horribly slow, with
> the right optimization it became incredibly fast.

I'll definitely take a look at your queries.  sqlite might be a decent 
way to do this in inn as an optional feature if I go that route.
Re: RFC: Open sourcing csiph-web
#93166
Author: Anton Antimo
Date: Sun, 29 Nov 2026 01:53
17 lines
1830 bytes
Kevin Bowling <kevin.bowling@kev009.com> writes:

> Hi,
>
> In the announcement of csiph.com -- <10t2kh8$1a6i$1@csiph.com> or
> https://csiph.com/group/news.software.nntp/t/10t2kh8%241a6i%241@csiph.com
> -- I mentioned eventually desiring to open sourcing this code.

I'm discovering about it right now.  What marvelous work!  Are you
offering "the entire" USENET archive?  I've always thought that
"someone" should do this.  But I think it should be forever, so I think
your work should actually be taken by a foundation that keeps a promise
to host it forever.  (We should be able to use a short link to reference
an USENET article.)

Speaking of which, that's another need I think we have: a URL shortener
with a forever guarantee: goo.gl, for instance, was a let-down.
Re: RFC: Open sourcing csiph-web
#93173
Author: Anton Antimo
Date: Sun, 29 Nov 2026 01:56
20 lines
1891 bytes
Marco Moock <mm@dorfdsl.de> writes:

> Am 27.11.26 um 12:28 schrieb Kevin Bowling:
>> In the announcement of csiph.com -- <10t2kh8$1a6i$1@csiph.com> or
>> https://csiph.com/group/news.software.nntp/
>> t/10t2kh8%241a6i%241@csiph.com -- I mentioned eventually desiring to
>> open sourcing this code.
>> Before doing this, I want to gauge interest to help me decide if and
>> how:
>> 1) How would you envision using it
>> 2) Do you have any desire to develop it
>
> I think about running it on a publicly reachable machine. Is it
> possible to use it with apache (maybe with it as reverse-proxy), so I
> can install a proof of work captcha etc.
>
> How much resources does it need?

I'm also curious to how is the full-text search being done.  Hopefully
he can answer this one too while he answers yours.
Re: RFC: Open sourcing csiph-web
#93170
Author: Kevin Bowling
Date: Sun, 29 Nov 2026 10:11
22 lines
1996 bytes
On 11/27/26 8:28 AM, Marco Moock wrote:
> Am 27.11.26 um 12:28 schrieb Kevin Bowling:
>> In the announcement of csiph.com -- <10t2kh8$1a6i$1@csiph.com> or 
>> https://csiph.com/group/news.software.nntp/ 
>> t/10t2kh8%241a6i%241@csiph.com -- I mentioned eventually desiring to 
>> open sourcing this code.
>>
>> Before doing this, I want to gauge interest to help me decide if and how:
>> 1) How would you envision using it
>> 2) Do you have any desire to develop it
> 
> I think about running it on a publicly reachable machine. Is it possible 
> to use it with apache (maybe with it as reverse-proxy), so I can install 
> a proof of work captcha etc.

Yes Apache as a reverse proxy would work fine.  It is an Axum Rust 
application so it binds to a port and serves HTTP.

> How much resources does it need?

For a small site with a PoW captcha, maybe a couple GB.  It mostly 
depends on the threading window size.
Re: RFC: Open sourcing csiph-web
#93171
Author: Kevin Bowling
Date: Sun, 29 Nov 2026 10:17
29 lines
2398 bytes
On 11/28/26 6:53 PM, Anton Antimo wrote:
> Kevin Bowling <kevin.bowling@kev009.com> writes:
> 
>> Hi,
>>
>> In the announcement of csiph.com -- <10t2kh8$1a6i$1@csiph.com> or
>> https://csiph.com/group/news.software.nntp/t/10t2kh8%241a6i%241@csiph.com
>> -- I mentioned eventually desiring to open sourcing this code.
> 
> I'm discovering about it right now.  What marvelous work!  Are you
> offering "the entire" USENET archive?  I've always thought that
> "someone" should do this.  But I think it should be forever, so I think
> your work should actually be taken by a foundation that keeps a promise
> to host it forever.  (We should be able to use a short link to reference
> an USENET article.)

I have to install new hardware, but I will work with Jesse to get a full 
Usenet history and then figure out how to make that work well.  That was 
always my goal and thankfully he did it.

I doubt there is enough interest or funds for a foundation, but you are 
welcome to look for such a thing.  At least with the code, people can 
replace mine in the future.

> Speaking of which, that's another need I think we have: a URL shortener
> with a forever guarantee: goo.gl, for instance, was a let-down.

It does support message lookup like this:
https://csiph.com/mid/11e9nou%24304m0%241@news.trigofacile.com
Re: RFC: Open sourcing csiph-web
#93174
Author: Kevin Bowling
Date: Sun, 29 Nov 2026 20:37
32 lines
2536 bytes
On 11/28/26 6:56 PM, Anton Antimo wrote:
> Marco Moock <mm@dorfdsl.de> writes:
> 
>> Am 27.11.26 um 12:28 schrieb Kevin Bowling:
>>> In the announcement of csiph.com -- <10t2kh8$1a6i$1@csiph.com> or
>>> https://csiph.com/group/news.software.nntp/
>>> t/10t2kh8%241a6i%241@csiph.com -- I mentioned eventually desiring to
>>> open sourcing this code.
>>> Before doing this, I want to gauge interest to help me decide if and
>>> how:
>>> 1) How would you envision using it
>>> 2) Do you have any desire to develop it
>>
>> I think about running it on a publicly reachable machine. Is it
>> possible to use it with apache (maybe with it as reverse-proxy), so I
>> can install a proof of work captcha etc.
>>
>> How much resources does it need?
> 
> I'm also curious to how is the full-text search being done.  Hopefully
> he can answer this one too while he answers yours.

Tantivy is integrated into the application, which schedules polls 
against the group high water marks.  It takes a couple days to build a 
full index with my current retention and hardware, but I have it 
throttled back a fair bit so it doesn't impact normal site traffic. 
Once the index is caught up, new polls are pretty light and occur every 
5 minutes.

I think search should probably move into the NNTP server, perhaps as a 
loosely coupled communications plugin.  People could experiment with 
distributed search engines as they choose.
Re: RFC: Open sourcing csiph-web
#93175
Author: Kevin Bowling
Date: Sun, 29 Nov 2026 20:41
43 lines
3048 bytes
On 11/29/26 1:37 PM, Kevin Bowling wrote:
> On 11/28/26 6:56 PM, Anton Antimo wrote:
>> Marco Moock <mm@dorfdsl.de> writes:
>>
>>> Am 27.11.26 um 12:28 schrieb Kevin Bowling:
>>>> In the announcement of csiph.com -- <10t2kh8$1a6i$1@csiph.com> or
>>>> https://csiph.com/group/news.software.nntp/
>>>> t/10t2kh8%241a6i%241@csiph.com -- I mentioned eventually desiring to
>>>> open sourcing this code.
>>>> Before doing this, I want to gauge interest to help me decide if and
>>>> how:
>>>> 1) How would you envision using it
>>>> 2) Do you have any desire to develop it
>>>
>>> I think about running it on a publicly reachable machine. Is it
>>> possible to use it with apache (maybe with it as reverse-proxy), so I
>>> can install a proof of work captcha etc.
>>>
>>> How much resources does it need?
>>
>> I'm also curious to how is the full-text search being done.  Hopefully
>> he can answer this one too while he answers yours.
> 
> Tantivy is integrated into the application, which schedules polls 
> against the group high water marks.  It takes a couple days to build a 
> full index with my current retention and hardware, but I have it 
> throttled back a fair bit so it doesn't impact normal site traffic. Once 
> the index is caught up, new polls are pretty light and occur every 5 
> minutes.
> 
> I think search should probably move into the NNTP server, perhaps as a 
> loosely coupled communications plugin.  People could experiment with 
> distributed search engines as they choose.

This part also gives me a little pause to consider before releasing the 
code.

It implies downloading, in parallel, every article from an NNTP server. 
That is generally pretty efficient, but if someone points it at a random 
server it will tie up a reader connection for the duration and 
potentially move many GB of data.

Moving this feature in to the NNTP server fixes both issues.
Re: RFC: Open sourcing csiph-web
#93176
Author: Anton Antimo
Date: Mon, 30 Nov 2026 22:08
37 lines
2722 bytes
Kevin Bowling <kevin.bowling@kev009.com> writes:

> On 11/28/26 6:53 PM, Anton Antimo wrote:
>> Kevin Bowling <kevin.bowling@kev009.com> writes:
>> 
>>> Hi,
>>>
>>> In the announcement of csiph.com -- <10t2kh8$1a6i$1@csiph.com> or
>>> https://csiph.com/group/news.software.nntp/t/10t2kh8%241a6i%241@csiph.com
>>> -- I mentioned eventually desiring to open sourcing this code.
>> I'm discovering about it right now.  What marvelous work!  Are you
>> offering "the entire" USENET archive?  I've always thought that
>> "someone" should do this.  But I think it should be forever, so I think
>> your work should actually be taken by a foundation that keeps a promise
>> to host it forever.  (We should be able to use a short link to reference
>> an USENET article.)
>
> I have to install new hardware, but I will work with Jesse to get a
> full Usenet history and then figure out how to make that work well.
> That was always my goal and thankfully he did it.

That's really nice.

>> Speaking of which, that's another need I think we have: a URL shortener
>> with a forever guarantee: goo.gl, for instance, was a let-down.
>
> It does support message lookup like this:
> https://csiph.com/mid/11e9nou%24304m0%241@news.trigofacile.com

Wonderful.  Now we need to keep this running forever (somehow).

I have a nice fairly short domain that right now runs a URL shortener.
I could provide you with an API so that your system could make direct
use of it.  I'm not sure I have enough disk space for some public use of
the system.

Would you like me to drop you an e-mail to discuss this further?
Re: RFC: Open sourcing csiph-web
#93178
Author: Kevin Bowling
Date: Tue, 01 Dec 2026 20:46
44 lines
3069 bytes
On 11/30/26 3:08 PM, Anton Antimo wrote:
> Kevin Bowling <kevin.bowling@kev009.com> writes:
> 
>> On 11/28/26 6:53 PM, Anton Antimo wrote:
>>> Kevin Bowling <kevin.bowling@kev009.com> writes:
>>>
>>>> Hi,
>>>>
>>>> In the announcement of csiph.com -- <10t2kh8$1a6i$1@csiph.com> or
>>>> https://csiph.com/group/news.software.nntp/t/10t2kh8%241a6i%241@csiph.com
>>>> -- I mentioned eventually desiring to open sourcing this code.
>>> I'm discovering about it right now.  What marvelous work!  Are you
>>> offering "the entire" USENET archive?  I've always thought that
>>> "someone" should do this.  But I think it should be forever, so I think
>>> your work should actually be taken by a foundation that keeps a promise
>>> to host it forever.  (We should be able to use a short link to reference
>>> an USENET article.)
>>
>> I have to install new hardware, but I will work with Jesse to get a
>> full Usenet history and then figure out how to make that work well.
>> That was always my goal and thankfully he did it.
> 
> That's really nice.
> 
>>> Speaking of which, that's another need I think we have: a URL shortener
>>> with a forever guarantee: goo.gl, for instance, was a let-down.
>>
>> It does support message lookup like this:
>> https://csiph.com/mid/11e9nou%24304m0%241@news.trigofacile.com
> 
> Wonderful.  Now we need to keep this running forever (somehow).
> 
> I have a nice fairly short domain that right now runs a URL shortener.
> I could provide you with an API so that your system could make direct
> use of it.  I'm not sure I have enough disk space for some public use of
> the system.

What do you have in mind?  It's already fairly short, so not sure I want 
to add complexity to my own installation.  But you can set up your own 
shortener using the URL scheme above with an HTTP 401 or 402 and it will 
just work!

> Would you like me to drop you an e-mail to discuss this further?
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads