Grokking the System Design Interview, Volume II
Vote

0% completed

Flash Sale: Detailed Component Design

Step 6: Detailed Component Design and Data Management

A buy request passes through several states on its way to a sale. We track that request as a reservation, a database row that holds one unit of stock for one user while payment is pending.

Each state is owned by a different service. This section follows one request from the first click to its final outcome.

1. Transaction States

  • WAITING: the request is in the Kafka queue, waiting for stock. It exists only in Kafka, not in the database.
  • **`PROCESSING

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content