Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many clients can servers handle at a time?

I suppose the answer would depend a lot on what kind of activities the clients will have, but suppose I want to make a client/server architecture, which only involves of connecting and disconnecting.

That is, opening a TCP connection and maintaining it for, say, three hours.

Is there a hard limit (set by the operating system, or by the protocols etc) on how many possible connections there can be at once?

Also, what overheads will this have on the server? if 10000 clients would connect using TCP and maintain that connection (assuming TCP has its own keepalive functionality) for 3 hours, will the server have to process anything besides keepalive, the connection and disconnection actions?

like image 488
kamziro Avatar asked Feb 20 '11 07:02

kamziro


1 Answers

I blogged about this here: http://www.serverframework.com/asynchronousevents/2010/12/one-million-tcp-connections.html

On Windows there are some resource limits which might cause you problems, but 10,000 connections is easy. In fact I've run more than 70,000 connections on a pretty low spec VM, see here http://www.lenholgate.com/blog/2005/11/windows-tcpip-server-performance.html for details.

It will, most probably, be what you do in YOUR code that limits the number of connections that you can handle, the modern operating system will easily handle more than you can in your code.

like image 110
Len Holgate Avatar answered Oct 06 '22 01:10

Len Holgate