WebSocket connection reuse during Hoppscotch collection runs
0 reputation · 22 Nov 2022, 07:16 UTC
WebSocket connection behavior in collection runs
Hoppscotch supports executing multiple WebSocket requests as part of a collection run. Each request can target the same endpoint, yet the documentation does not clarify whether the client reuses an existing WebSocket connection or opens a new one for each request in the sequence.
Browser developer tools show a new WebSocket handshake for every request when run manually, but collection runs may behave differently because they execute in a controlled loop. The absence of a documented connection-sharing policy makes it difficult to predict resource usage on both the client and the target server, especially when a collection contains dozens of WebSocket steps.
Understanding this behavior is relevant for load testing scenarios and for servers that enforce per-connection limits or authentication state tied to the WebSocket session.
Open questions
- Does Hoppscotch reuse a single WebSocket connection for multiple requests to the same host within one collection run?
- If connections are not reused, is there a configurable limit on concurrent WebSocket connections during a collection run?
- Are there any documented events or hooks that allow a pre-request script to manage connection lifecycle explicitly?