All Questions
Real Time Updates hard

Socket.IO uses a multi-step handshake (Long Polling -> Upgrade to WebSocket). Why does this architecture force you to use 'Sticky Sessions' (Session Affinity) at the Load Balancer?

  1. A It keeps the TCP connection alive longer.
  2. B WebSockets are stateful.
  3. C The HTTP Long Polling request creates a session ID in server memory. The subsequent Upgrade request must hit the *same* server to find that ID, or the handshake fails.
  4. D It reduces latency.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions