Skip to content

Course

Realtime Systems: WebSockets & SSE

Realtime web architecture from the trenches — connection lifecycles, horizontal scaling, SSE and polling fallbacks, presence, conflict resolution, and the operational failures that only appear at 3 a.m.

9 lessons

Course Q&A

Reviews

Enrolled members can rate this course.

No reviews yet.

Connection Foundations

WebSocket lifecycle, protocol design, and fallback transports — what actually happens on the wire.

  1. 01The WebSocket Lifecycle: Upgrade, Frames, Heartbeats, CloseWhat the handshake really buys you, how frames and heartbeats behave, and why most connection bugs are lifecycle bugs.22mOpen
  2. 02Realtime Protocol Design: Messages, Versions, and Payload DisciplineDesigning message envelopes, versioning wire contracts, and keeping payloads small enough to survive real traffic.20mOpen
  3. 03SSE and Polling: Fallbacks That Are Features, Not FailuresWhen Server-Sent Events or polling are the better transport, how fallback ordering works, and what proxies do to long-lived responses.21mOpen

Scaling Delivery

Horizontal scaling, fan-out, presence, and backpressure when one process is no longer enough.

  1. 01Scaling Connections: Sticky State Without Sticky ArchitectureConnection state is local to a process; scaling means separating socket ownership from application state and designing for redistribution.24mOpen
  2. 02Fan-Out and Broker Design: Pub/Sub, Sharding, and Slow ConsumersHow events move from one server to many, why broker semantics matter, and how to keep a slow room or client from poisoning the fleet.23mOpen
  3. 03Presence: The Simple Feature That Is Never SimpleOnline status is a distributed-systems problem — leases, multiple devices, privacy, and why last-seen beats boolean online state.21mOpen

Correctness and Operations

Ordering, conflict resolution, reconnects, observability, and running realtime systems in production.

  1. 01Conflict Resolution: Last-Write-Wins, OT, and CRDTsWhat happens when two clients edit the same state, how to choose a merge strategy, and why collaboration is a data-model decision.25mOpen
  2. 02Reconnects, Resume, and Ordering: Making Loss ExplicitClients will disconnect constantly; correct systems make gaps detectable, resynchronizable, and bounded in cost.24mOpen
  3. 03Operating Realtime in Production: Metrics, Abuse, Deploys, and Load TestsThe operational playbook: what to measure, how abuse actually arrives, how to drain connections, and how to load-test before users do it for you.26mOpen