Open 2e0802d2-c193-4d95-9ba5-5c68cc072bfc opened 3 years ago
While support for the so-called “Happy Eyeballs” algorithim described in RFC 8305 was implemented for asyncio in Issue bpo-33530, socket's create_connection function remains left without it causing suboptimal performance in broken dual-stack environments.
socket.create_connection()
does indeed need this feature. In addition to our existing asyncio
implementation's behavior we could also look at what Golang has done, they implemented the original rfc-6555 quite a while back and are tracking 8305 in https://github.com/golang/go/issues/23841. (even only implementing rfc-6555's variant would be a big improvement)
It'd also be interesting if we could avoid maintaining two implementations of this in the stdlib so long as the cost to do so is not even more complicated to maintain. (ex: Would the ironic thing of socket.create_connection running its own singular asyncio event loop just for the duration of this task feasible or a Bad Idea™️ ?)
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields: ```python assignee = None closed_at = None created_at =
labels = ['library', '3.9', 'performance']
title = 'Implement \xe2\x80\x9cHappy Eyeballs\xe2\x80\x9d algorithim (RFC 8503) in socket.create_connection()'
updated_at =
user = 'https://bugs.python.org/origin400-p'
```
bugs.python.org fields:
```python
activity =
actor = 'origin400-p'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation =
creator = 'origin400-p'
dependencies = []
files = []
hgrepos = []
issue_num = 44644
keywords = []
message_count = 1.0
messages = ['397542']
nosy_count = 1.0
nosy_names = ['origin400-p']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'performance'
url = 'https://bugs.python.org/issue44644'
versions = ['Python 3.9']
```