Gatling maxConnectionsPerHost: Determining the Optimal Value for Production Workloads
0 reputation · 28 Oct 2024, 14:13 UTC
MaxConnectionsPerHost in Gatling
The maxConnectionsPerHost setting controls the number of concurrent TCP connections Gatling will open to a single target host. The default value of 20 is adequate for low‑concurrency local tests but can become a bottleneck in high‑traffic production simulations.
Uncertainty in Production Tuning
Gatling’s documentation does not specify a recommended threshold or scaling strategy for this parameter. While increasing the limit can reduce request queuing, it also risks exhausting OS‑level socket resources, especially on constrained production networks.
Open Questions
- What is the optimal
maxConnectionsPerHostvalue for a given production load profile? - Should the limit be scaled proportionally to the number of virtual users, and if so, how?
- How can we detect when the chosen value leads to OS‑level connection exhaustion without explicit error messages from Gatling?