All Questions
Real Time Updates medium

To broadcast a message to 1 million connected users, iterating through a list and sending one-by-one (`for user in users: send()`) is bad practice. Why?

  1. A The loop will run out of memory.
  2. B It requires too much bandwidth.
  3. C It corrupts the TCP stack.
  4. D It blocks the Event Loop (in single-threaded languages like Node.js), causing high latency for the last users in the list and freezing the server.

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

Get the app

Related questions