Goofed Home

Scaling: ActivityPub over NNTP?

$$21184
https://piefed.social/u/rimu posted on Apr 1, 2026 09:18

Here’s an interesting thought experiment.

Way back in the 1980s and 90s, Usenet was a sorta-federated discussion forum (using the NNTP protocol) that was very popular. It still exists and is distributing 400 million messages each day (mostly spam and trash as far as I can tell). Hard numbers are difficult to come by but it seems like Usenet is capable of significantly higher throughput. Why is that?

The big thing holding ActivityPub back is the fan-out. You know the story - someone with 50,000 followers causes their instance to send up to 50,000 HTTP POSTs every time they click the little spinny star or reply to something.

It’s basically a hub-and-spoke network topology. Except everyone takes turns being the hub, ideally, but not much in practice. And in this topology, the hubs are where the strain and bottlenecks are.

Back in the 1980s they had computers literally 1000 times slower than ours and network links to match. So how did they do this? With a peer to peer network topology! When a new post is made, they don’t send it to everyone they just send it to a handful of other servers. Those servers in turn forward the post on to a handful of other peers, and so on, until the whole network receives the post. No individual server is a single point of failure and none has to bear the full brunt of orchestrating it all.

Let’s do a picture. A creates a post and sends it to B and D.

A ─ B ─ C  
 \      /  
   ─ D ─  

B sends it on to C.

Meanwhile D sends it on the C also but C already has it so does nothing more. IRL this would be a much larger mesh. Who peers with who can be a mixture of manual selection and random spiciness.

Posts can arrive out of order so each server would need to wait until the dependencies between posts are resolved before making them available to clients. That’s a bit tricky.

In the ActivityPub-over-NNTP idea, each NNTP post would be a thin wrapper around a data structure containing the HTTP headers (with signature and digest) and JSON that a normal HTTP POSTed Activity would have. Servers would use NNTP to distribute the activities and upon receiving one they’d POST it to their own /inbox to run the usual ActivityPub processing that their AP instance does.

{  
  "headers": {  
    "Signature": "...",  
    "Digest": "...",  
    "Date": "..."  
  },  
  "activity": { ... normal ActivityPub JSON ... }  
}  

In this way there is no need to rewrite ActivityPub semantics as only the transport layer changes. Our existing inbox logic remains intact.

NNTP comes with a lot of historical baggage so we’d probably need to evolve the protocol a bit. Maybe use HTTP requests (even http2 streams?) instead of the original line-oriented text protocol using raw TCP sockets. But you get the idea.

Thoughts?

https://piefed.social/c/technical-discussion/p/1939768/scaling-activitypub-over-nntp

$$21355
https://piefed.social/u/rimu posted on Apr 1, 2026 20:22
In reply to: https://piefed.zip/comment/4549493

Yes, I think that’s part of NNTP already. Each post has a list of the servers it has traveled through so when considering where to forward the post on to a server can check if it’s already been there. That would help somewhat but still there would be quite a few times when a server discards posts.

I haven’t gotten deep enough into this yet but I’m sure there have been protocol improvements since NNTP that address this. Gossip protocols have been experimented with since the early 2000s. For example, rather than servers saying to others “I have this post, do you want it?” they might say “the most recent post I have in the fediverse@lemmy.world community is #5” and another server which only has posts #1 and #2 would respond “cool, give me posts #3, #4 and #5”.

https://piefed.social/comment/10785115
$$21357
https://piefed.social/u/rimu posted on Apr 1, 2026 20:26
In reply to: https://mitra.social/objects/019d49cb-4435-0420-3d7c-c45d9303451f

Good point.

https://piefed.social/comment/10785159

Conversation

$$10996
https://mitra.social/users/silverpill posted on Mar 12, 2026 19:38
In reply to: https://activitypub.space/post/1545

@julian @Edent dansup? No, it is not his site.

https://mitra.social/objects/019ce38e-9ba5-cf3c-e31b-158190f1c117

$$10999
https://social.coop/users/django posted on Mar 12, 2026 19:45
In reply to: https://mitra.social/objects/019ce38e-9ba5-cf3c-e31b-158190f1c117

@technical-discussion @julian @Edent @silverpill I think it is @melvincarvalho

https://social.coop/users/django/statuses/116217919251689766
$$11181
https://mastodon.social/users/melvincarvalho posted on Mar 13, 2026 09:42
In reply to: https://social.coop/users/django/statuses/116217919251689766

@django @technical-discussion @julian @Edent @silverpill yes socialdocs is something i help look after. Anything needed?

https://mastodon.social/users/melvincarvalho/statuses/116221211731515385
Create New Post