System Design Practice¶
โ Roadmap ยท Topic 25.5 ๐ฅ ๐ฏ
System design rounds are increasingly common for mid-level .NET roles and standard for senior. They are not testing whether you know the "right" architecture โ they're testing whether you ask about constraints before you draw boxes.
The method (use this every time)¶
- Clarify requirements โ functional and non-functional. Never start drawing first. Ask about scale, read/write ratio, consistency needs, latency budget.
- Estimate โ requests per second, storage growth, bandwidth. Rough is fine; showing you think in numbers is the point.
- Define the API โ endpoints and their contracts. This forces concrete thinking.
- Data model โ entities, relationships, and the access patterns that drive the schema.
- High-level design โ draw the boxes. Client, gateway, services, data stores, queues.
- Deep dive โ the interviewer picks a component. Be ready for any of them.
- Bottlenecks and scale โ where does this break at 10ร? What do you fix first?
- Tradeoffs โ say out loud what you gave up and why.
Step 1 is the one candidates skip and the one interviewers score hardest. Jumping to a diagram before establishing constraints is the most common failure in this round.
Worked examples to write¶
Each gets its own file in this folder. Write them out fully โ a design you've written is one you can improvise from; one you've only read is not.
- [ ] URL shortener โ hashing, collisions, redirect performance, analytics
- [ ] E-commerce checkout โ inventory reservation, payment idempotency, order saga
- [ ] Notification service โ fan-out, delivery guarantees, retries, dead lettering
- [ ] Rate limiter โ algorithms (token bucket, sliding window), distributed state
- [ ] File upload service โ presigned URLs, chunking, virus scanning, CDN
- [ ] Chat / real-time feed โ SignalR, backplane, presence, message ordering
- [ ] Multi-tenant SaaS API โ tenant isolation, per-tenant data, noisy neighbours
- [ ] Job scheduler โ durability, exactly-once-ish semantics, poison messages
- [ ] Audit log service โ write volume, immutability, retention, query patterns
- [ ] Read-heavy product catalog โ caching layers, invalidation, search
.NET-specific things to bring up¶
These are what make it an ASP.NET Core system design round rather than a generic one. Working one or two in naturally shows depth:
IHttpClientFactory+ Polly for service-to-service resilience โ 19.11HybridCacheor Redis for the caching layer โ 19.3- Background processing:
BackgroundServicevs Hangfire vs a queue consumer โ 21.1, 21.3 - Outbox pattern for reliable event publishing from EF Core โ 23.8
- YARP as gateway/BFF โ 23.10
- Health checks driving Kubernetes probes โ 18.5, 24.6
- OpenTelemetry for cross-service tracing โ 18.7
- Stateless app servers so you can scale horizontally โ 24.12
Numbers worth knowing¶
Rough orders of magnitude. Precision isn't the point โ being able to estimate at all is.
| Latency | |
|---|---|
| In-memory cache read | ~100 ns |
| Redis round trip (same DC) | ~0.5โ1 ms |
| Database query (indexed, same DC) | ~1โ10 ms |
| Cross-region round trip | ~50โ150 ms |
| Disk seek (SSD) | ~0.1 ms |
| Scale | |
|---|---|
| One well-tuned ASP.NET Core instance | thousands of req/s for simple endpoints |
| 1M requests/day | ~12 req/s average, plan for 5โ10ร peak |
| 1 KB per row ร 100M rows | ~100 GB |