• RFC: Open sourcing csiph-web

    From Kevin Bowling@kevin.bowling@kev009.com to news.software.nntp on Fri Nov 27 04:28:57 2026
    From Newsgroup: news.software.nntp

    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
    --- Synchronet 3.21e-Linux NewsLink 1.2
  • From Colin Macleod@user7@newsgrouper.org.invalid to news.software.nntp on Fri Nov 27 14:56:59 2026
    From Newsgroup: news.software.nntp

    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!
    --- Synchronet 3.21e-Linux NewsLink 1.2
  • From Kevin Bowling@kevin.bowling@kev009.com to news.software.nntp on Fri Nov 27 08:08:28 2026
    From Newsgroup: news.software.nntp

    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.
    --- Synchronet 3.21e-Linux NewsLink 1.2
  • From Marco Moock@mm@dorfdsl.de to news.software.nntp on Fri Nov 27 16:28:55 2026
    From Newsgroup: news.software.nntp

    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
    --- Synchronet 3.21e-Linux NewsLink 1.2
  • From Colin Macleod@user7@newsgrouper.org.invalid to news.software.nntp on Fri Nov 27 16:56:48 2026
    From Newsgroup: news.software.nntp

    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!
    --- Synchronet 3.21e-Linux NewsLink 1.2
  • From Kevin Bowling@kevin.bowling@kev009.com to news.software.nntp on Fri Nov 27 13:54:19 2026
    From Newsgroup: news.software.nntp

    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.
    --- Synchronet 3.21e-Linux NewsLink 1.2