SpinTheMic
Pro

Interview practice question

Routing messages to the right WebSocket server

System Design · APIs and Communication · Intermediate

Your chat app has users connected to different WebSocket servers. How does a message from user A reach user B on another server?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Connection registry: user → server.
  • Pub/sub between servers (Redis, Kafka).
  • Server publishes to B's channel/server.
  • Persist message first.
  • Handle offline users.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics