✏️ Explanatory Question

What techniques reduce latency and what techniques increase throughput?

👁 13 Views
📘 Detailed Answer
🟢 Easy
No previous question
No next question
💡

Answer with Explanation

To reduce latency:

  • Cache close to the user - CDN, browser, in-memory cache.
  • Add database indexes so lookups avoid full scans.
  • Move work off the request path onto a queue.
  • Use connection pooling and keep-alive to avoid handshake cost.
  • Place servers geographically nearer to users.

To increase throughput:

  • Scale horizontally behind a load balancer.
  • Batch requests and writes to amortise fixed overhead.
  • Shard data so work spreads across nodes.
  • Use async and non-blocking I/O so threads are not idle.
  • Compress payloads to fit more work through the same bandwidth.

Note that batching and queueing help throughput but can hurt latency - that is the core trade-off.

No previous question
No next question