开发者

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 kee开发者_运维知识库palive functionality) for 3 hours, will the server have to process anything besides keepalive, the connection and disconnection actions?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜