[Twisted-Python] Problems with long term connections?
rodsenra at gpr.com.br
Thu Feb 15 07:13:07 EST 2007
[ John Pote ]:
|I am putting together a number of servers that will all communicate
|with each other every 5 or 10 minutes via TCP/IP connections. It
|occured to me that once a connection has been established I might as
|well leave it open permanently. Are there any problems/side effects of
| Is it better policy to close and re-open the connection every now and
One advantage of keeping connections opened is to avoid the 3-way
handshake that will take place during connection setup. For a few
number of conenctions I see no immediate disadvantage, but I guess
it all depends on what one means by "few" and the context.
|Also am I correct in assuming that if a computer at one end of a
|TCP/IPconnection crashes or otherwise becomes unavailable the twisted
|program at the other end will only know this when it attempts to send
|a packet to the now crashed computer and, having no reply, gets a
AFAICT, that *is not* a limitation of Twisted. This is simply the fact
that TCP -- while a connection is in silence -- will increment its
timers, since the rx end-point is unaware if nothing is sent or if
the netpath is congested.
More information about the Twisted-Python