HostnameEndpoint should have a deadline, not just a timeout.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 10
Description
| @Lukasa reported | |
|---|---|
| Trac ID | trac#9152 |
| Type | enhancement |
| Created | 2017-05-29 15:12:52Z |
I've said this many times: users don't want timeouts, they want deadlines.
Right now HostnameEndpoint takes a per connection attempt timeout argument. This means if the hostname resolves to 50 IPs, HostnameEndpoint will take 50 * timeout seconds to actually timeout. This kind of interface is inevitably surprising to users and almost impossible to configure in a sensible way. No-one wants this interface, it's just the easiest one to code for.
What users want is to say "spend no more than 30 seconds attempting to connect, then give up". This is better expressed as a deadline than a timeout (though it can also be spelled totalTimeout if you prefer), and is what we should actually expose.
Searchable metadata
trac-id__9152 9152
type__enhancement enhancement
reporter__Lukasa Lukasa
priority__normal normal
milestone__None None
branch__
branch_author__
status__new new
resolution__None None
component__core core
keywords__None None
time__1496070772607098 1496070772607098
changetime__1496094095340545 1496094095340545
version__None None
owner__None None
cc__mithrandi@...
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the HostnameEndpoint implementation and its existing tests, then read how the current per-connection-attempt timeout is applied across hostname resolution results. Define the change around a total deadline for the whole connection attempt, and update coverage so the operation gives up after the requested overall duration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100