this post was submitted on 15 Jun 2023
190 points (93.6% liked)
Programming
17538 readers
67 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities [email protected]
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Pulling this out of my ass, but I think the problem might be in Lemmy using websockets.
I feel like supporting 1500 simultaneous users making a request every 10-20 seconds is easier than keeping 1500 websockets alive.
Irregardless, Lemmy does feel very snappy compared to other websites I've had the displeasure of using. Main problem is low robustness in the RPC layer.
Wait — it uses websockets for each and every user??! That’s just completely insane and of course it will fail to scale! There is zero reason for that, have specific live threads with websockets where it makes sense (though that is only mostly a one-way communication so even there it is an overkill), but for mostly static content it is just insanely inefficient.. surely I’m more than fine with that upvote appearing a minute later and not in “real time”!
As I said - I'm pulling this out of my ass. Browser debugging tools don't support websockets well, but looking at the network log, it seems to start a websocket for every tab.