Nov 2026
9 Mon
10 Tue
11 Wed
12 Thu
13 Fri 09:00 AM – 06:00 PM IST
14 Sat 09:00 AM – 06:00 PM IST
15 Sun
Prakhar Goel
@prakhar98
Submitted Sep 27, 2026
Reconnecting a WebSocket restores the connection, but not the state of an interrupted stream. At Adalat AI, we faced this in live courtroom transcription; I’ll show how we retransmit audio the server missed and replay transcript updates the client missed after a network drop.
At Adalat AI, we work to reduce India’s judicial backlog by helping courtrooms record proceedings more efficiently. In lower courts, judges often write proceedings by hand; stenographers take shorthand and prepare a fair copy later.
Our live-transcription system is now used across 11 states. In the last quarter alone, judges recorded more than 1.5 million minutes (~25,000 hours) on our platform. The system captures audio in the browser, streams it to a transcription backend, and returns text while the hearing is underway.
That workflow depends on a two-way stream over internet connections that can be unstable. A WebSocket can fail silently, and reconnecting does not tell us which audio chunks the backend processed or which transcript updates reached the browser. Retransmitting from the wrong point can duplicate work; resuming too far ahead can leave gaps. The engineering challenge is to keep one logical transcription session intact across connections.
Developers, Platform Engineers
Intermediate
The session follows the evolution of our reliability design as each fix exposed another failure. We began by trusting WebSocket close events and browser network signals, only to discover that a broken connection could remain apparently open. Application-level keepalives gave us a reliable way to detect these silent failures and reconnect.
Reconnecting restored the transport, but it did not restore the stream. We introduced sequence tracking in both directions, preserved session state across connections, and retained bounded buffers so the client could retransmit missing audio while the server replayed missed transcripts.
Finally, chunk acknowledgements gave us a measure of real delivery latency that the interface could use to reflect changes in connection speed.
A simulated demo will introduce network failures at each stage and show the system detecting the failure, reconnecting, and recovering the stream.
Hard-earned engineering lesson
We initially trusted WebSocket close events and browser network signals to tell us when connectivity was lost. In practice, switching networks or losing internet access could leave the socket apparently open, and calls to send() could continue without proving that the server received the data. Even calling close() did not guarantee that the browser would promptly invoke the close handler.
We needed to send a continuous audio stream from the browser while returning partial transcripts over the same session. We considered three transport approaches:
Within the WebSocket design:
Production experience
#reliability #websockets #realtimesystems #streaming #networking #platformengineering #casestudy #failurestory
{{ gettext('Login to leave a comment') }}
{{ gettext('Post a comment…') }}{{ errorMsg }}
{{ gettext('No comments posted yet') }}