Skip to content

feat: add configurable newConnectionThresholdMs to YAML pool config#117

Merged
cbaugus merged 3 commits intomainfrom
fix/pool-metrics-and-yaml-config
Apr 13, 2026
Merged

feat: add configurable newConnectionThresholdMs to YAML pool config#117
cbaugus merged 3 commits intomainfrom
fix/pool-metrics-and-yaml-config

Conversation

@cbaugus
Copy link
Copy Markdown
Owner

@cbaugus cbaugus commented Apr 13, 2026

The pool stats tracker uses a latency heuristic to classify requests as new vs reused connections. The default 100ms threshold doesn't fit all environments — fast targets can complete a full TLS handshake under 100ms, making new connections appear reused.

Now configurable per-test via YAML:

config:
pool:
newConnectionThresholdMs: 50

The threshold is applied and pool stats are reset on each POST /config.

cbaugus and others added 3 commits April 13, 2026 14:18
The pool stats tracker uses a latency heuristic to classify requests as
new vs reused connections.  The default 100ms threshold doesn't fit all
environments — fast targets can complete a full TLS handshake under
100ms, making new connections appear reused.

Now configurable per-test via YAML:

  config:
    pool:
      newConnectionThresholdMs: 50

The threshold is applied and pool stats are reset on each POST /config.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… pool docs

Rename makes it clear the setting only affects the Prometheus metrics
heuristic — not actual connection behavior.  Added docs/CONNECTION_POOL.md
with use cases for new-connection-per-request, default reuse, and
long-lived keepalive patterns.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cbaugus cbaugus merged commit 86dc6e5 into main Apr 13, 2026
2 of 3 checks passed
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.

1 participant