How the interviewer opens it
“Design a loyalty rewards service for a retailer. Customers earn and redeem points, and unused points expire. The service must maintain an auditable balance despite repeated requests, purchase cancellations, and concurrent redemptions.”
The prompt is vague on purpose. The first minutes are for you. Reduce the prompt to the core features and agree on the numbers before you draw.
What to clarify first
- Point rules
- Scale and traffic mix
- Latency
- Consistency and durability
- Expiry and point allocation
- Purchase cancellations
- Repeated requests and event order
- Audit history
- Cancellation scope
- Region scope
The interviewer has the answers. In a SysRound round, Alex gives these answers, as a real interviewer does.
Scope of a strong answer
Core requirements
- Credit points for a purchase
- Redeem points without excess spend
- Expire unused points at the required time
- Reverse canceled purchases and preserve an audit history
Usually out of scope
- Payment collection and refund execution
- Reward rates, tiers, and promotions
- Transfers between customer accounts
- Redemption refunds
- Concurrent writes across regions
What interviewers ask about
- Concurrent redemptions and repeated requests
- Concurrent requests compete for one balance. A lost response must not cause another spend, even after the account receives more points.
- Point expiry
- Each earn has a separate expiry. A delayed task must not permit a spend of expired points or remove points twice.
- Purchase cancellations
- A cancellation can arrive before its earn or after the customer spends the points. Expiry changes the amount that the service must reverse.
- Balance history and recovery
- The balance and audit history must describe the same changes. Old debt must remain explainable after many years.
Common mistakes
- The service trusts a cached balance to approve a redemption.
- The design keeps only a balance and discards each earn's history.
- The expiry task subtracts the original earn amount after the customer spends some points.
- The service records a request key separately from the point change.
- The service treats each event delivery as a new earn or reversal.
- The service deletes older history without preserving a valid basis for account rebuilds.
The bar by level
- Senior (L5/E5)
- Defines point lots, exact expiry, durable request outcomes, and purchase reversals. Handles rejected retries, event order, debt, and failures after commit.
- Staff (L6+/E6+)
- Meets the senior requirements. States invariants across balances, lots, debt, and history. Proves that retention permits complete account rebuilds. Defines reconciliation and safe recovery. Explains regional ownership and contention within one account.