swift-server / swift-server/async-http-client
introduce a `concurrentHTTP2ConnectionsPerHostSoftLimit`
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 1.1k
- Forks
- 156
- PR merge metrics
- No merged PRs in 30d
Description
There are use-cases where the target server can handle more concurrent requests than its MAX_CONCURRENT_STREAMS HTTP/2 setting. This is especially often the case behind load balancers which may just pick an arbitrary number or leave the default of 100.
In such a configuration, it's currently impossible to get more than MAX_CONCURRENT_STREAMS concurrently running HTTP requests with AHC if running over HTTP/2.
For HTTP1 we have concurrentHTTP1ConnectionsPerHostSoftLimit to tune this but for HTTP/2 such a setting doesn't exist.
In my case, I'll have to downgrade to HTTP/1.x just to get over the target's MAX_CONCURRENT_STREAMS setting :(.
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 existing concurrentHTTP1ConnectionsPerHostSoftLimit setting and the HTTP/2 connection or stream scheduling entry points. Trace how MAX_CONCURRENT_STREAMS limits requests, then identify the tests covering per-host concurrency. Done means HTTP/2 users can configure a soft limit above that server setting without breaking existing HTTP/1 behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100