All Questions
Real Time Updates hard

In a high-frequency trading app, you must broadcast the same price to 10,000 users with minimal latency variance. Why is a simple 'for loop' over sockets bad, and what is the OS-level optimization?

  1. A Use Multithreading.
  2. B The loop adds latency to the last user. Optimization: Use `scatter-gather` I/O or kernel-bypass networking (e.g., DPDK) to minimize user-space to kernel-space copying.
  3. C Use a database trigger.
  4. D Use bigger packets.

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

Get the app

Related questions