240k WebSocket clients onto two bun worker servers on a RPi5! #13122
Replies: 2 comments 1 reply
-
@rgillan Do I understand correctly that you just replaced nodejs with bun without any additional changes to the code or infrastructure? |
Beta Was this translation helpful? Give feedback.
-
@Akiyamka no we refactored our code wherever possible to use the native bun api calls, which for the main part was the move from the websocket module server functionality to Bun.serve. The code architecture and I'd guess 90-95% of the codebase remained exactly the same. |
Beta Was this translation helpful? Give feedback.
-
So continuing our marvellous journey with bun. Migrated our core stack from nodejs/websocket where we'd be lucky to get 16k clients per worker/instance. Our swarm test results today has a single RPi5/8GB happily supporting 240k concurrent connections and consuming just under 2GB and next to no cpu (so that's 120k connections vs 16k, not a bad performance improvement!).
Fantastic work everyone, very much appreciated
Beta Was this translation helpful? Give feedback.
All reactions