WSS long-lived connection test

Voice, real-time chat and coding tools like Codex rely on a WebSocket connection that stays open for a long time. This test keeps a WSS connection to this site open for 1–30 minutes and records the latency of every round trip, plus timeouts, drops and reconnects.

Not tested yetAbout 1 min

Can a long-lived connection stay online?

Keeps a WebSocket connection open to this site, exchanges messages continuously, and records latency, timeouts, drops and reconnects.

Duration
Mode

For ongoing chats and coding sessions: messages never stop, checking whether the connection stays stable.

Round-trip time
—
Shown after the test
Drops
—
Shown after the test
Longest unbroken connection
—
Shown after the test
01

Connection results

How this connection behaved over the whole test: how fast the round trips were, how stable, whether there were timeouts or drops, and whether it reconnected on its own.

After you start, this lists connection setup, streamed output, timeouts, drops, reconnects and the end, in order.

02

How the test works

Mimics how AI tools use long-lived connections: one connection held from start to finish, messages exchanged on a fixed schedule, and automatic reconnects after a drop.

STEP 1Open a WSS connection

The browser completes a WebSocket handshake with this site. In production it uses encrypted wss://, the same protocol AI services use.

STEP 2Exchange messages on a schedule

Continuous: regular heartbeats, echoes of a random payload, and simulated 20-chunk AI streaming output. Shorter tests run at a faster pace: at 1 minute, a heartbeat every 5 seconds and streamed output every 15 seconds; at 5 minutes, streamed output once a minute. Resume after idle: stays silent after connecting and sends messages only at checkpoints.

STEP 3Record, and reconnect on drop

Records the latency of every round trip. No reply within 10 seconds counts as a timeout; a closed connection counts as a drop and is reconnected automatically, up to 5 times, just like AI tools do.

This test

Mode
Continuous
Planned duration
1 min
Elapsed
Shown after the test
Heartbeat
Every 5 sec
Echo
Every 15 sec, a random payload
Streamed output
Every 15 sec, 20 chunks
Latency summary
Every 15 sec
Message round trips
Shown after the test
Tested at
Shown after the test

Connection info

Protocol
Shown after the test
Test endpoint
This site's long-lived connection service /api/v1/wss
Edge location
Shown after the test
Longest unbroken connection
Shown after the test
Reply timeouts
10 sec
Auto reconnect
Up to 5
03

How we judge

Results are based only on events actually observed in this test: no reply within 10 seconds counts as a timeout, and a closed connection counts as a drop.

Connection stableThe connection stayed online for the whole test, with no timeouts and no drops.
Reply timeoutsThe connection stayed up, but some messages took more than 10 seconds to get a reply, or never got one. AI tools would look stuck or keep spinning.
Connection droppedThe connection was closed at some point. AI tools show "Reconnecting" and answers in progress may be lost.
DisruptedThe page went to the background during the test and the browser may have paused timers, so this result isn't reliable.
Round-trip timeRTTThe time for a message to go from the browser to this site and back. We use the median so that occasional spikes don't skew the result.
JitterjitterHow much round-trip times vary (standard deviation). The higher it is, the more chats and voice speed up and slow down.
ContinuousloopFor ongoing chats: messages never stop, checking whether the connection holds and replies arrive on time.
Resume after idleidleFor stepping away and coming back: many proxies and gateways quietly cut idle connections, so we check at 1, 2, 4 and 7 minutes and other checkpoints.
04

How to make long-lived connections more stable

If the test shows timeouts or drops, check these three things. Exact names vary by proxy app and network.

Switch to a more stable route

The most common cause of drops and timeouts is an unstable proxy node or route. Switch to another node and test again, then compare drops and jitter.

Check idle timeout settings

If Resume after idle fails while Continuous works, a proxy, gateway or router is usually closing connections that carry no data for a while. Check the idle timeout or keepalive settings of that software.

Keep the page in the foreground while testing

Browsers deprioritize background pages, and device sleep or Wi-Fi switching will also drop the connection. Keep the page open and your device awake during the test.

05

FAQ

Common questions about WebSocket connections, how the test works and how to read the results.

What is WSS (WebSocket)?

WebSocket is a two-way, long-lived connection between the browser and a server. Once open, either side can send messages at any time without making a new request. WSS is encrypted WebSocket — the WebSocket equivalent of HTTPS.

Which AI scenarios depend on long-lived connections?

Real-time voice chat, collaborative editing and coding tools like Codex all depend on long-lived connections. Codex is open source, and its code shows that it connects to OpenAI over WebSocket by default; after an error it retries up to 5 times (showing messages like "Reconnecting… 2/5") and only switches to HTTPS for that session if it still can't connect.

How long should the test run?

1 minute quickly shows whether a connection can be made and whether there are obvious delays or drops; 5 minutes catches most "works for a while, then drops" problems; some proxies only cut idle connections after tens of minutes, so pick 30 minutes for a thorough check.

Continuous or resume after idle — which should I pick?

Pick Continuous if you chat or code without long pauses; pick Resume after idle if you often step away and find you have to refresh to continue. Running both is the most thorough.

What round-trip time is normal?

This measures the round trip to this site's edge location, not to the AI service. Anywhere from tens to two or three hundred milliseconds is common; what matters more is whether there are timeouts and drops, and how much it fluctuates.

How much data does the test use?

Each heartbeat and echo is only a few dozen bytes, and each streamed output about 1 KB: a few KB for 1 minute and under 100 KB even for 30 minutes. Results are computed only in your browser; this site doesn't store them.

Test endpoint: this site's long-lived connection service · /api/v1/wssReply timeout: 10 sec · Auto reconnect: up to 5 times