Skip to content

fastcgi: add max_conns_per_host - #8426

Open
joshbarros wants to merge 3 commits into
caddyserver:masterfrom
joshbarros:feat/7082-fastcgi-max-conns
Open

joshbarros wants to merge 3 commits into
caddyserver:masterfrom
joshbarros:feat/7082-fastcgi-max-conns

Conversation

@joshbarros

Copy link
Copy Markdown

Fixes #7082

The FastCGI transport opens a connection per request and had no way to cap concurrency, unlike the HTTP transport's max_conns_per_host.

Add max_conns_per_host to the transport. A per-address semaphore blocks a request until a slot is free or the request context is cancelled, and the slot is released when the response body closes. Zero keeps the current unlimited behavior. Tests cover blocking, a different upstream, and release.

FastCGI opens a connection per request. Add max_conns_per_host to cap concurrent connections per upstream address, releasing the slot when the response body is closed. Zero keeps the current unlimited behavior.
@caddy-cla

caddy-cla Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

✅ Contributor License Agreement

All identified contributors have signed the CLA. Thank you!

@joshbarros
joshbarros force-pushed the feat/7082-fastcgi-max-conns branch from 043e2f3 to 23459a4 Compare November 17, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add max_conns_per_host support for fastcgi transport

1 participant