-
Hi! I'm interested in testing socketioxide and socketio for a project, and just wanted to get an initial impression of what overhead the protocol comes with. I tried benchmarking the implementation against a pure websocket implementation in this repo. The socketioxide implementation seems to require an order of magnitude more memory than the websocket counter-part. This surprised me a bit, and I'm wondering if maybe I've made a mistake somewhere. I understand that there is more setup involved in establishing a websocket connection, but once established shouldn't the memory footprint be similar? Would love feedback if you have any! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hi! |
Beta Was this translation helpful? Give feedback.
-
Hi @sondrelg, I invite you to check again, it should be much better now. There is still a significant gap however that I will defend here: If you have a really precise idea of what you want to build and that it is something that must supports 50K sockets one a single machine with less than a Gig of memory then, this may be not the project you are looking for. Otherwise I think that socketioxide is great for building adding realtime application and focusing on business logic and eventually horizontally scale if it is needed. Thanks you for you benchmark though, Thanks to thisn I realised there was clearly some memory issues introduced in the v0.16 version and even before! |
Beta Was this translation helpful? Give feedback.
Hi @sondrelg, I invite you to check again, it should be much better now. There is still a significant gap however that I will defend here:
Yes socket.io has a significant overhead compared to websocket. As it supports 2 multiplexing layers and compatibily to legacy systems http polling most notably, as well as horizontal scaling and some other cool features. It is made to be "user-friendly" and really easy to use. At the cost of this overhead.
If you have a really precise idea of what you want to build and that it is something that must supports 50K sockets one a single machine with less than a Gig of memory then, this may be not the project you are looking for. Otherwise I think that soc…