[Twisted-Python] Twisted's ability to handle many open connections.

Terry Jones tcj25 at cam.ac.uk
Wed Apr 26 15:13:22 MDT 2006


I'm completely new to Twisted. As I understand it, a Twisted server runs as
a single process - no forking, no threads. To me that implies that select
(or poll or pselect, etc) is being heavily used to feed data to Deferreds.

If that's the case, how does Twisted (portably) allow for a large number of
file descriptors?

I'm considering using Twisted for a project. Twisted would front requests
from the web, but also from (e.g.) remote command line applications via an
API.  These latter connections could potentially be numerous, and long
lived.  Should I be thinking about how Twisted deals with this, or does it
already scale to allow more simultaneous connections / file descriptors
than a naive server program would be able to maintain?

Given what looks like widespread use of Deferreds in Twisted, I suppose
that there is not a 1-1 relationship between connections and file
descriptors? If so this makes the issue more pressing.

Thanks for any help,
Terry




More information about the Twisted-Python mailing list