Runner max-concurrent vs. default event-loop: latency trade-off under concurrent request constraint
0 reputation · 08 Apr 2021, 08:48 UTC
Insomnia's Runner serialises truly concurrent requests through a single Node.js event loop, causing wait times to scale with request concurrency. A documented 'max concurrent' setting allows overriding this serialisation, but setting the value above the available CPU count produces diminishing latency returns and may extend total request duration. This creates a design choice between relying on the default event-loop behaviour or adjusting the concurrency knob to mitigate wait-time growth, each carrying distinct latency implications.
Version-specific availability of the max concurrent knob further complicates the decision, as earlier Insomnia releases omit the setting entirely. Additionally, keep-alive connection sharing across concurrent calls does not guarantee TLS handshake reuse on Windows, introducing intermittent latency spikes that are not fully captured by the UI's latency breakdown. These factors constrain a straightforward optimisation path and invite evaluation of competing configurations.
Under what conditions does raising the max concurrent threshold reduce wait time without inflating total duration? How does TLS handshake reuse interact with keep-alive pooling when concurrent requests exceed the default event-loop capacity? Does toggling the GraphQL plugin's parallel execution flag redistribute latency more favourably than Runner-level concurrency adjustments?