Layer 3 · Go deeper · 7 min
Go deeper
Size it, build it, then make the calls an interviewer will push you on.
Back of the envelope
Size it up
Tap through each step of the arithmetic.
How many orders are open at peak, and how busy is the engine?
What would Step Functions Standard cost for every order?
Build-up · 5 steps
Order 81 fails at the store
One order as a durable workflow. Each step adds an entry to its history, and the last two show compensation running in reverse.
Step 1 of 5
Reserve stock
The workflow, with the order ID as its workflow ID, calls the inventory activity. The engine appends the result to the order’s event history.
4 interview moments
You’re the candidate
The interviewer pushes on the hard parts. Pick an approach and see how it holds up.
Deep dive 1 of 4
Interviewer
“Stock, orders and the payment ledger all live in one PostgreSQL database. How do you place an order?”
Your move. Pick an approach:
Deep dive 2 of 4
Interviewer
“About 10% of orders fail because the dark store can’t fill them. Where does the payment step go?”
Your move. Pick an approach:
Deep dive 3 of 4
Interviewer
“The engine retries the charge activity after a timeout. Which idempotency key should it send?”
Your move. Pick an approach:
Deep dive 4 of 4
Interviewer
“Each order lives about 30 minutes, at 2,000 orders a second. Which engine runs it?”
Your move. Pick an approach: