// Industry
Market feeds that reconnect without their symbols
A feed that comes back connected and not subscribed. The socket is healthy, the dashboard is green, and the price on the screen stopped moving twenty minutes ago.
// The problem
Why this is hard
A live feed does not fail loudly. It reconnects. The socket reports connected, every dashboard stays green, and the thing that actually broke — a symbol that never resubscribed, a gap the protocol offered to replay and nobody claimed — produces no error anywhere, because none of it is a request. What reaches the customer is a number that renders exactly as it did when it was true. The interesting part is that almost none of this is a bug in the reconnect logic: the transport layer usually recovers perfectly, and the application layer was never asked to.
The transport came back, the subscription did not
A reconnected socket is a new socket, and room membership belonged to the one that left. Unless something re-issues the subscribe on connect, the client is attached to a feed that will never send it anything again.
Re-issue every subscription in the connect handler, which runs on each reconnect as well as the first connection, instead of once on mount. Re-subscribing resumes the stream from now, not from where it stopped, so whatever ticked during the gap is missing unless the client refetches it — and the server's own bookkeeping has to treat a repeat subscribe as a no-op.
The stream offers to resume and nobody asks
Server-sent events carry an id field precisely so a client can say where it stopped, and the reconnect hint decides how often it has to. Send neither and every reconnect is an unrecoverable hole, sized by how long the gap lasted rather than by what was missed.
Number every event and keep a buffer to resume from that reaches past your slowest realistic reconnect, so a client picks up where it stopped. The buffer is yours to build — the specification requires none — and it is counted in events while gaps are measured in seconds, so it quietly stops covering them as traffic grows; a reconnect it no longer reaches comes back with a hole in it and no error.
// What matters here
The capabilities that move the needle
Real-Time Ops
Alerting on the counter that binds — for a feed, the age of the last tick per symbol, which is a different question from whether the connection carrying it is open.
Voice Agents in Production
Alerts that speak, and the desk phone that still carries the escalation — the other real-time surface in a trading product, and the one where being late is being wrong.
RAG & Knowledge Systems
Answers grounded in sources retrieved when the question was asked, checked claim by claim — because a summary of the market is a claim about the present tense.
// Deep dives
Going deeper for fintech
// Proof
Measured on our own hardware
resubscribe, 2 of 3 outages
Probability a symbol update arrives within five seconds of the client reporting connected: nil for a client that subscribes once, certain for one that re-subscribes on connect — across a transport close and a three-second server restart, 40 trials per arm on our own harness. On the third mechanism both score nil, because that client never reconnects.
events lost per 2 s reconnect
Events a client missed on each reconnect with a two-second retry hint and one event every 20 ms: 100.6 with no id field, against the 100 that gap over cadence predicts — and none once every event is numbered and the server can still resume from the id the client held. Medians of three 30-second runs on our own harness, one process on loopback with no proxy and no TLS, so each figure is a floor.
erased after a silent drop
How often a cleanup erased the registration of a client that had already reconnected and re-registered: never when the old connection closed or was reset, every time when it vanished silently and its stale handler fired afterwards, and never once the delete checks identity rather than key. Six trials per arm, the client back 150 ms after the cut, heartbeat timers about fortyfold faster than a real deployment's — certain inside the ping timeout, 67% one interval past it, gone beyond.
Not a client outcome and not a vendor figure — numbers we took, on hardware we can name, with the method published in full. The write-ups: The socket reconnected. The subscription did not., Your reconnect hint sets your data loss, or it sets nothing at all, Your disconnect handler deletes the connection that replaced it.
// From the field
What we wrote about it
Your disconnect handler deletes the connection that replaced it
The client did everything right: it noticed the network change, came back in under a second, and announced itself again. Forty seconds later the server forgot it existed, because the connection it had replaced finally got round to dying.
The replica count is a correctness invariant, and nothing says so
One line says how many of a service to run. The line above it says to start the new container before stopping the old. Nobody wrote down that the first line was load-bearing, and the second one is documented to break it.
A paywall that is only a parameter name
The call site passes a flag that reads like an entitlement check. The callee binds it and never looks at it again. Nothing was bypassed, because nothing was ever there — and the tool that could have said so did say so, at a severity nobody gates on.
The unique index only one of your two services declares
The declaration is in the repository, it is correct, and it is applied at startup. Whether it ever took effect was decided months ago by which of two containers happened to start first, and the service that owns it has been logging success ever since.
The exit code that tells the orchestrator not to restart you
The error path was the careful one: log the failure, then exit rather than limp on. It exits with no argument, the runtime turns that into zero, and a restart policy reading exit codes concludes the work is done. The loudest deaths are the ones nobody hears.
Your reconnect hint sets your data loss, or it sets nothing at all
A server-sent events stream that omits the id field loses everything published while it is away, and the amount is arithmetic rather than luck. The reconnect hint you tuned decides that number — or decides nothing whatsoever, depending on one line you may not have written.
// FAQ
Common questions
// Related
Related industries
Logistics
A driver's phone reports position over the least reliable connection in the system. What reaches the dispatcher is not what happened — it is what arrived, in the order it arrived.
Media & Streaming
Always-on video that has to stay up and stay affordable — fleet capacity, transcode cost, and the failure modes that only appear at production framerate.
// Let's build
Building AI for fintech?
Tell us where you are. We reply within a day with a concrete next step.