Every scenario opens the same way: clarify requirements, state the scale arithmetic out loud, agree the shape, then go deep where they steer.
Key Terms
| Term | In one line |
|---|---|
| Expand-contract | Add the new column, dual-write, backfill, migrate readers, drop the old — how you make a breaking schema change with zero downtime |
| Superseded-by metadata | Field marking a stale document version so retrieval can exclude it |
| Pre-filter ACL | Entitlement applied in the retrieval query itself, never on the results |
| Fan-out | One inbound file/event distributed to many sinks |
| Escalation framework | The rules deciding when an agent hands an incident to a human |
Numbers That Matter — the targets worth memorizing
| Scenario | Targets |
|---|---|
| Enterprise RAG assistant | 50K users · 200K queries/day (~140 QPM avg, ~500 peak) · 10M docs · p95 <3 s streamed · 99.9% business hours · re-index within 5 min of a document change |
| IoT analytics | 1M events/s sustained, 1.5M burst · dashboard <5 s · critical alert <2 s · hot 7–14 days · cold 90 days downsampled · 99.95% |
| Incident response agents | MTTT <60 s · auto-remediated MTTR <3 min · human-escalated MTTR −50% · false-positive auto-remediation <1% · dedup >70% |
| Claims processing | 100K claims/day · real-time coding <3 s · 99.9% · 7-year retention (HIPAA) · <$0.10/claim · clean claim rate >95% |
| Global e-commerce | Catalog eventual · inventory strong in home region · orders/payments strong single-region · profile active-active conflict-resolved · recommendations best-effort |
| Platform roadmap | MVP 0–6 mo · Scale 6–12 · Platform 12–18 · Intelligence 18–24 |
Decision Rules
- Say the requirements clarification out loud first. Scale, latency budget, consistency needs, compliance, retention. The design that answers an unasked question scores nothing.
- Choose the stream service from the arithmetic. A general-purpose message broker tops out far below 1M events/sec; a partitioned log (Event Hubs, Kafka, Kinesis with enough shards) is purpose-built for it. Name the number, then name the service.
- Consistency is chosen per data type, not per system. In one e-commerce design, the catalog is eventual, inventory is strong within its home region, orders are strong single-region, and profiles are active-active with conflict resolution. Saying “the system is eventually consistent” is a weaker answer than that table.
- Expand-contract for any breaking schema change mid-migration. Add new, dual-write, backfill, move readers, then drop old. Never a single cutover migration on a live system.
- Avoid the distributed monolith explicitly: independent deployability with no coordinated releases, database-per-service with no cross-service SQL, backward-compatible API versioning, and async as the default (target ~80%).
- Stale documents need event-driven re-indexing, not nightly batch: blob change → event → re-embed → upsert, with a superseded-by marker so the old version can’t be retrieved in the gap.
- Prioritize phased delivery by ROI, and say so — an interviewer asking for a 24-month platform wants to hear what ships in month three.
Say This Out Loud
“Before I draw anything: fifty thousand users at two hundred thousand queries a day is about a hundred and forty queries per minute average, call it five hundred at peak. That’s genuinely modest throughput — the hard requirements here aren’t QPS, they’re the sub-three-second p95 on a streamed answer over ten million documents, and document-level access control. So I’m going to spend my design attention on retrieval latency and on the ACL model, not on horizontal scale.”
“A million events per second rules out a general-purpose message broker immediately — Service Bus and its equivalents top out well below that. This needs a partitioned log: Event Hubs or self-managed Kafka, sized by partition count for consumer parallelism. And I’d separate hot from cold explicitly: seven to fourteen days queryable at full resolution for operational dashboards, ninety days downsampled to one-minute and one-hour rollups for trend analysis. Keeping ninety days at full resolution would dominate the cost for almost no analytical value.”
“For a breaking schema change mid-migration I’d use expand-contract rather than a cutover. Add the new column alongside the old, dual-write to both, backfill historical rows in batches, migrate readers over once the backfill verifies, and only then drop the old column. Every step is independently reversible, which is the whole point — a single cutover migration on a live system means your rollback plan is a restore from backup.”