I have a remote server that needs to be able to accept multiple simultaneous connections from clients on a specific port. I need the connections to be fast and reliable.
I am planning to use TCPServer on the remote side and TCPSocket on the client side. There'd likely be 200+ connections to the server.
Do we have any known benchmarks in Ruby for a system like this? Also, do I need to worry about the underlying data multiplexing at socket level or Ruby/OS libraries take care of the same?
Finally, will you folks be able to recommend me any specific links/books that talk about designing systems like this? I googled but books about networking in Ruby seem to be an oddity.
A multi-client TCP server generally creates a separate thread for each client. Therefore, it can handle as many connections as the machine/OS will allow. This limitation is managed by the kernel. So, as far as benchmarks go, it really depends on the performance of your machine.
Here is a link to some examples/tutorials for Ruby Socket Programming:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With