I have a general ubuntu server, and I want to use Ruby to deal with many TCP requests, I want to know how many connections it can handle.
A:
Ruby is merely a language. Do you mean a web server running Ruby code? Then that really depends on the environment it's on, it's configuration, etc.
Steven
2010-10-06 06:51:08
I mean one Ruby script
why
2010-10-06 06:58:49
Then the answer is "as many as the host environment the script is running on"
Gareth
2010-10-06 07:01:57
So do you think there is performance problem if using Ruby to deal with too many tcp connections?
why
2010-10-06 07:12:54
Well, I could write a script which would cause performance problems when using *one* TCP connection. Using more connections certainly means you have to think harder about your performance issues, but the issues won't be down to the number of connections you're limited to
Gareth
2010-10-06 07:45:36
+2
A:
A single Ruby process can handle as many connections as the machine/ubuntu will allow the ruby process. This is a process limitation that is managed by the linux kernel. Use ulimit to increase file descriptors and you can have more socket connections. You will also need memory to handle a large number of connections and you may need to tune tcp settings.
abdollar
2010-10-06 07:01:35