Interview Q&A / System Design

INTERVIEW Q&A · 70 QUESTIONS

System Design interview questions

Caching, scaling, databases and classic design problems for beginners.

  1. How do you make a message consumer idempotent?

    Record the id of each processed message in the same transaction as its effect, and skip ids already seen. Or design the operation to be naturally repeatable, such as setting a value rather than incrementing it.

    IntermediateQuick answer1 min read
  2. How does an idempotency key stop duplicate payments?

    The client sends a unique key with each payment request. The server stores the key with the result; if the same key arrives again, it returns the saved result instead of charging again.

    IntermediateQuick answer1 min read