WebSockets & Realtime
Persistent bidirectional connections and the capacity model they impose.
6 to work through
-
intermediate Multiple choice
A collaborative editor needs to push document changes to connected clients with minimal latency. Which transport should it use, and what does the choice imply for infrastructure?
2 min answer -
advanced
2.4 million live WebSocket sessions sit on a gateway fleet being retired this quarter, with a replacement fleet ready in the same region. Sequence the cutover so no session is forced to reconnect more than once and the subscription path is never asked to absorb a storm.
3 min answer -
advanced
A chat platform's websocket edge gateways lose a region to a cloud networking failure. How should reconnect storms, session resumption, message-gap recovery and gateway draining be designed so a 30-second outage does not become a 3-hour one?
3 min answer -
advanced
A dashboard product uses WebSockets for live updates. It works at 5,000 concurrent users and falls apart at 50,000. Diagnose the architectural issues.
2 min answer -
advanced
A deployment drops 200000 WebSocket connections at once. Describe what happens next and how you would make it safe.
3 min answer -
advanced
A trading platform must push live prices to hundreds of thousands of concurrent connections. What are the architectural constraints of that fan-out, and how does it differ from the order path?
2 min answer
6 terms in this topic
Connection Migration
Keeping a logical session alive when the underlying network path changes - either in the transport, or reconstructed by the application after a reconnect.
conceptFan-Out Amplification
The property that one input event becomes as many output events as there are subscribers, making the workload proportional to audience size rather th…
conceptReconnect Storm
The synchronised burst of clients re-establishing connections after a disruption, which is far more expensive than steady-state traffic and routinely…
protocolServer-Sent Events
A one-way streaming protocol over plain HTTP in which the server pushes text events to the client on a long-lived response.
patternWebSocket Backplane
A shared publish/subscribe layer letting a message published on one server reach clients connected to a different server.
protocolWebSockets
A persistent bidirectional connection over HTTP — the right tool for server-initiated updates, and a stateful component in an otherwise stateless arc…
Neighbouring topics
Networking
General material on the network path underneath an architecture.
TCP/IP
Handshakes, congestion control, head-of-line blocking and connection reuse.
HTTP/1.1, HTTP/2 & HTTP/3
Multiplexing, prioritisation and the transport each is built on.
DNS
Resolution, TTL behaviour, traffic steering and failover latency.
TLS & Certificates
Encryption, integrity, authentication, termination points and expiry.
Layer 4 vs Layer 7
Connection-level versus request-level balancing, and what each unlocks.
Reverse Proxies
One place for TLS, routing, caching, compression and rate limiting.
Content Delivery Networks
Edge caching, origin offload, spike absorption and dynamic content.
Firewalls & Security Groups
Default-deny, stateful rules, and restricting egress as well as ingress.
NAT & Egress
Outbound-only connectivity, its per-gigabyte cost and its zone binding.
VPC Design
Address planning, peering and the ranges you can never resize.
Subnetting
Tiering, zone binding, and sizing for an address-hungry platform.
Routing & BGP
How traffic finds you, anycast, and route withdrawal as a failure mode.
Service Mesh Networking
Sidecar proxies supplying mTLS, retries and traffic policy.
gRPC Transport
HTTP/2 multiplexing, binary encoding and streaming semantics.
API Gateways
The single entry point, and the business logic that must stay out of it.
Network Performance
Latency floors, bandwidth-delay product, and what no code change fixes.
Private Connectivity
Private endpoints, peering and dedicated links to managed services.
Network Troubleshooting
Flow logs, packet paths, and localising a problem to a hop.