SpinTheMic
Pro

Interview practice question

Order spans three services' databases

System Design · Databases · Experienced

Placing an order must reserve stock, charge payment and create a shipment, each in a different service with its own database. How do you keep it consistent?

What a strong answer covers

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

  • Avoid 2PC across services.
  • Saga: sequence of local transactions.
  • Compensating actions on failure.
  • Orchestration or choreography.
  • Idempotent steps, outbox for events.
Practise this topic

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

See all topics