The interview problem

Practice prompt

A customer portal loses realtime updates when a corporate proxy restarts. Design reconnection and gap recovery.

Original practice, not a reported company interview. Scenarios and numbers are illustrative. Interview date: not applicable. Sources retrieved October 1, 2026.

1. Scope and worked approach

Use authenticated connections, bounded heartbeat behavior and reconnect backoff with jitter. Track the last acknowledged application event cursor and fetch missed events or a fresh snapshot after reconnect. A connected socket alone is not proof that the UI has applied every update.

2. Trace the design or derivation

Connect
  → apply and checkpoint
  → disconnect
  → backoff
  → replay or snapshot

Negotiate the fallback with customer IT rather than treating a blocked protocol as a random application failure. Monitor reconnection rate and replay lag separately. A page that quietly reconnects while missing changes is more dangerous than an explicit stale-data indicator.

3. Calculate the example

A client applies events 100 through 105, disconnects and reconnects when the server is at 110. It needs 106–110 or a snapshot, not merely a new open socket.

4. Failure cases and trade-offs

Transport retries can duplicate events. Heartbeats below a proxy timeout do not guarantee every network permits WebSockets. Infinite replay retention is unrealistic.

5. Validation, follow-ups and self-review

Acceptance: interrupt the proxy, duplicate events and expire a cursor. Follow-up: what is the polling fallback? Self-review: separate transport liveness from application continuity.

Sources and related practice

Technical reference: developer.mozilla.org — WebSocket transport; application replay protocol is original.

Source publication/update: Not established. Retrieved October 1, 2026. The workflow, calculations and review exercises are original; this reference is not evidence that a company asked this question.

Continue with Design resumable browser event streams; Integrate through a restricted customer network.

Continue your preparation

Choose a connected learning path or browse more FDE interviews questions. Read our editorial method and attribution policy.