swift-server / swift-server/async-http-client

introduce a `concurrentHTTP2ConnectionsPerHostSoftLimit`

Open
#567 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.