Free course · 20 lessons · Intermediate
Real-Time APIs
WebSockets, SSE, long polling and WebTransport; designing, receiving and securing webhooks; fan-out, presence, connection management, slow clients, real-time auth, resync, mobile and testing.
1. Real-Time Transports
WebSockets, SSE, long polling and what comes next.
- The Real-Time Landscape — Choosing between polling, long polling, SSE, WebSockets, webhooks and push.
- WebSockets in Depth — Handshake, frames, heartbeats, close codes and message protocols.
- Server-Sent Events — Simple, HTTP-native server push with automatic reconnection.
- Long Polling and Fallbacks — When persistent connections aren't available.
- Emerging Options: HTTP/3, WebTransport and Managed Services — What's new and when to use a managed real-time platform.
2. Webhooks
Designing, receiving, securing and making webhooks reliable.
- Designing Webhook Delivery (Sender Side) — Event types, payloads, subscriptions and delivery pipeline.
- Receiving Webhooks Reliably — Verify, persist, acknowledge fast and process asynchronously.
- Webhook Security — Signatures, secrets rotation, SSRF protection and payload safety.
- Webhook Reliability: Retries, Ordering and Replay — Make missed deliveries recoverable.
3. Scaling Real-Time Systems
Fan-out, presence, connection management, slow clients and auth.
- Fan-Out with Pub/Sub Backends — Deliver messages to users connected to many server instances.
- Presence, Typing Indicators and Ephemeral State — Track who's online without overwhelming the system.
- Managing Connections at Scale — Load balancing, limits, deploys and reconnect storms.
- Slow Clients and Backpressure — Protect servers from consumers that can't keep up.
- Authentication and Authorization for Real-Time — Auth at connect, per-channel authorization and token expiry.
4. Real-Time in Practice
Ordering and resync, mobile, testing and choosing managed services.
- Ordering, Gaps and Resynchronization — Detect missed messages and recover state.
- Real-Time on Mobile — Sockets in the foreground, push in the background, battery awareness.
- Testing Real-Time Systems — Unit, integration, load and chaos tests for persistent connections.
- Managed vs Self-Hosted Real-Time — Make a build-or-buy decision with real numbers.
5. Capstone
Design a live collaboration feature and a webhook platform.
- Capstone: Real-Time Order Tracking — Design live updates for customers, drivers and support agents.
- Capstone: Build a Webhook Platform — Design outbound webhooks for a SaaS with 20,000 customer endpoints.