[off-topic] Maximum TCP Server Connections

S

Steve Holden

Sorry this question isn't strictly Python-related. Does any one know how
many simultaneous TCP connections it's practical to expect a TCP-based
server application to support (on the OS of your choice)? I'm looking
for the restrictions imposed by the operating environment rather than
the application itself.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
Blog of Note: http://holdenweb.blogspot.com
See you at PyCon? http://us.pycon.org/TX2007
 
P

Paul Rubin

Steve Holden said:
Sorry this question isn't strictly Python-related. Does any one know
how many simultaneous TCP connections it's practical to expect a
TCP-based server application to support (on the OS of your choice)?
I'm looking for the restrictions imposed by the operating environment
rather than the application itself.

http://www.kegel.com/c10k.html
 
G

Grant Edwards

Sorry this question isn't strictly Python-related. Does any one know how
many simultaneous TCP connections it's practical to expect a TCP-based
server application to support (on the OS of your choice)? I'm looking
for the restrictions imposed by the operating environment rather than
the application itself.

That depends entirely on the operating system environment. For some
it's zero. For others it's many thousands.
 
F

fumanchu

Sorry this question isn't strictly Python-related. Does any one know how
many simultaneous TCP connections it's practical to expect a TCP-based
server application to support (on the OS of your choice)? I'm looking
for the restrictions imposed by the operating environment rather than
the application itself.

Data point:

When using winsock2, the number of simultaneous TCP connections is
limited by the FD_SETSIZE preprocessor constant, which is often 64. It
must be set before including winsock2.h. See Google and http://
www.aminus.org/blogs/index.php/fumanchu/2006/12/23/
cherrypy_3_has_fastest_wsgi_server_yet#c38647

Note also that many TCP servers use one thread per child socket, in
which case you can hit a memory limit. IIRC, each Python thread on
Windows uses a 1 MB stack: http://mail.python.org/pipermail/python-
win32/2005-June/003346.html


Robert Brewer
System Architect
Amor Ministries
(e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top