Layer 3 · Go deeper · 6 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.
Rider assignment is down 10 minutes at dinner. How long to catch up?
Build-up · 5 steps
Follow one order through the log
Assume an illustrative dinner peak of 500 orders a second. The order-events topic has 12 partitions keyed by order ID, read by five consumer groups.
Step 1 of 5
Key every event by order ID
Orders appends each OrderPlaced to the order-events topic, keyed by order ID. Hashing the key sends all of order 7781’s events to one partition, read in exactly the order written; across partitions there is no order.
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
“The restaurant accepts, a rider is assigned, the customer is notified; loyalty and analytics react too. Who owns the flow?”
The core steps have deadlines, and a failure at step 3 needs compensating.
Your move. Pick an approach:
Deep dive 2 of 4
Interviewer
“Order events go to a log, and OrderCancelled must never overtake OrderPlaced. What do you key them by?”
Your move. Pick an approach:
Deep dive 3 of 4
Interviewer
“Notifications comes back after a 10-minute outage to a large backlog. Which events does it send first?”
Your move. Pick an approach:
Deep dive 4 of 4
Interviewer
“Checkout must know the UPI payment is authorised before it confirms the order. Do you use events for that?”
Your move. Pick an approach: