Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement “Happy Eyeballs” algorithim (RFC 8305) in socket.create_connection() #88810

Open
origin400-p mannequin opened this issue Jul 15, 2021 · 3 comments
Open
Labels
3.13 new features, bugs and security fixes performance Performance or resource usage stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@origin400-p
Copy link
Mannequin

origin400-p mannequin commented Jul 15, 2021

BPO 44644

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:

assignee = None
closed_at = None
created_at = <Date 2021-07-15.12:05:20.908>
labels = ['library', '3.9', 'performance']
title = 'Implement \xe2\x80\x9cHappy Eyeballs\xe2\x80\x9d algorithim (RFC 8503) in socket.create_connection()'
updated_at = <Date 2021-07-15.12:05:20.908>
user = 'https://bugs.python.org/origin400-p'

bugs.python.org fields:

activity = <Date 2021-07-15.12:05:20.908>
actor = 'origin400-p'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2021-07-15.12:05:20.908>
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']

@origin400-p
Copy link
Mannequin Author

origin400-p mannequin commented Jul 15, 2021

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.

@origin400-p origin400-p mannequin added 3.9 only security fixes stdlib Python modules in the Lib dir performance Performance or resource usage labels Jul 15, 2021
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@iritkatriel iritkatriel added type-feature A feature request or enhancement 3.12 bugs and security fixes and removed 3.9 only security fixes labels Aug 26, 2022
@gpshead gpshead added 3.13 new features, bugs and security fixes and removed 3.12 bugs and security fixes labels May 26, 2023
@gpshead gpshead changed the title Implement “Happy Eyeballs” algorithim (RFC 8503) in socket.create_connection() Implement “Happy Eyeballs” algorithim (RFC 8305) in socket.create_connection() May 26, 2023
@gpshead
Copy link
Member

gpshead commented May 26, 2023

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 golang/go#23841. (even only implementing rfc-6555's variant would be a big improvement)

@gpshead
Copy link
Member

gpshead commented May 26, 2023

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™️ ?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.13 new features, bugs and security fixes performance Performance or resource usage stdlib Python modules in the Lib dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants