[Python-Dev] socket.create_connection slow

Kristján Valur Jónsson kristjan at ccpgames.com
Thu Jan 15 09:41:52 CET 2009


Right, there is no way to try to simultaneously connect using ipv4 and ipv6, apparently.
Also, the problem with setting the registry TcpConnectMaxRetries registry entry is that it also affects retries wen no ACK is received.  This is probably something one doesn't want to mess with.

Okay, so do we want to bug MS about this?  Clearly it is a performance problem when implementing dual stack clients.

K

-----Original Message-----
From: "Martin v. Löwis" [mailto:martin at v.loewis.de] 
Sent: 15. janúar 2009 00:07
To: Kristján Valur Jónsson
Cc: python-dev at python.org
Subject: Re: [Python-Dev] socket.create_connection slow

> And Microsoft, realizing their problem , came up with this:
> http://msdn.microsoft.com/en-us/library/bb513665(VS.85).aspx

Dual-stacked sockets are a useful thing to have (so useful that
Linux made them the default, despite that the RFC says that the
default should be IPV6_V6ONLY). The Python library should make
all server sockets dual-stacked if possible.

Unfortunately:
- the socket option is not available on all systems, in particular,
  it is not available on Windows XP (you need Vista)
- you'll see the 1s delay on the client side if the server is
  not dual-stacked, so if the server "misbehaves", the client has
  to suffer.

Regards,
Martin





More information about the Python-Dev mailing list