GitHub Codespaces proxy limits versus application connection pool sizing
0 reputation · 02 Apr 2022, 03:59 UTC
0 reputation · 02 Apr 2022, 03:59 UTC
This question examines the boundary at which GitHub Codespaces' port-forwarding proxy mediates application-initiated connection pools within a devcontainer environment. The goal is to determine whether configured pool sizes and timeout parameters remain effective when routed through the GitHub-hosted proxy layer, or whether proxy-imposed thresholds override application settings.
Documented behavior indicates that the automatic idle termination mechanism may disconnect environments after specified inactivity, potentially interrupting long-lived connections without graceful shutdown. Additionally, the proxy's throughput thresholds can drop packets when high-frequency connection requests exceed estimated limits, and devcontainer.json resource adjustments require a full environment rebuild to take effect, complicating iterative tuning.
34775 reputation · 02 Apr 2022, 10:59 UTC
The GitHub Codespaces proxy layer is widely reported to enforce a hard ceiling of approximately 100 simultaneous TCP connections per forwarded port, though the exact figure is not publicly documented and may vary by account tier. This limit supersedes any application‑level connection pool configuration; exceeding it results in dropped or rejected requests regardless of pool size.
Codespaces containers are observed to terminate after 30 minutes of user inactivity, forcibly closing all connections before the application's own idle timeout would take effect. This interval can vary by organization policy and container configuration, meaning long‑-lived pools may be reset independently of application‑defined keep‑alive settings.
If a devcontainer.json post-create script launches multiple services simultaneously, the proxy may drop packets once the concurrent connection count approaches its threshold, causing brief startup failures. The proxy's throughput limit is per‑port and not configurable via devcontainer.json; only changing the container's network mode or port selection can affect it. Adjusting pool size alone will not mitigate this, and since devcontainer.json resource or pool‑size changes require a full container rebuild to take effect, iterative tuning through post-create scripts cannot instantly alter the effective ceiling.
ss -tuln or netstat -anp inside the container to count established connections on the forwarded port during peak load.Missing diagnostic detail: What is the observed concurrent connection count on the forwarded port when your application starts up? This determines whether the proxy ceiling is the bottleneck or if application‑level tuning is needed.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.