Skip to content

Connection Pooling

Reuse connections across parallel requests.

With pooling on, parallel requests share connections to the same host instead of each opening its own, and the pool caps connections per host, forces HTTP/2 and applies keepalive and connect timeouts. Multiplexing is always on in parallel runs.

pool.yaml
global:
  execution: parallel
  connectionPool:
    enabled: true
    maxStreamsPerHost: 10
    keepaliveTime: 60
    connectTimeout: 30

requests:
  - name: Users
    url: https://api.example.com/users
  - name: Posts
    url: https://api.example.com/posts
  - name: Comments
    url: https://api.example.com/comments

Benefits

  • Fewer handshakes

    Requests to the same host reuse open connections, so TCP and TLS setup isn’t repeated for each one.

  • HTTP/2 multiplexing

    In parallel runs, many requests share one connection as separate streams when the server supports HTTP/2.

  • Tunable

    maxStreamsPerHost, keepaliveTime and connectTimeout in YAML, or --connection-pool and friends on the command line.

Good for

  1. Large parallel suites against a single API host
  2. Hosts with expensive TLS setup
  3. Keeping the connection count low on shared environments
  4. Mirroring how a pooled production client behaves