Oddbean new post about | logout
 Can you please elaborate on the web's scaling architecture? 
 Too big a topic, it was largely done in the 1990s through lots of debates.  Here is one output document, which has largely stood the test of time (except for maybe the content negotiation part).  An important aspect is that connection oriented networks (such as websockets) carry a few overheads wrt scalability, but there's much more to it.

https://www.w3.org/TR/webarch/ 
 Thanks, will read that one. 
 Can you please expand on "connection oriented networks carry a few overheads wrt scalability"? I didn't see anything related in the linked doc. 

Is there any w3c doc specifically about web's scaling/caching architecture/principles?

Also do you have any suggestions of how nostr's cache architecture could look like?
 
 Connection-oriented networks carry overhead because they need to maintain continuous connections, which doesn’t scale well as the network grows. The web scales by focusing on stateless interactions and efficient caching strategies.

For Nostr’s caching, consider distributed caches or edge approaches to reduce server load. 
 It seems like connections on nostr are not too "stateful". All messages sent to the socket could be sent each in it's own separate connection, concurrently, handled by different caching replicas of the same relay or different threads of the same relay. There's no session/user-level state to coordinate and synchronize btw replicas/threads that could harm scalability.   
 Yes, I think you're onto something.  

NostR = notes and other stuff transmitted by relays.
Nost = Notes and other stuf.   
 No I mean that relay architecture and performance and scalability wouldn't differ much if it was plain http server.