Roadmap › .NET Full Stack Developer Interview — End to End › Module: Design and Architecture Round
Lessons in this course (10)
10. System design for a full stack .NET developer
AdvancedMediumLesson 10 of 10
You are not expected to design Netflix. Expect: "Design an e-commerce order system / a URL shortener / a notification service." Use this structure:
- Clarify requirements — functional (place order, track status) and non-functional (users, requests/sec, latency, availability, consistency).
- Estimate — e.g. 10k orders/day ≈ 0.1/sec average, peaks ×20; data ~5 GB/year → one SQL database is fine.
- API design —
POST /orders,GET /orders/{id}, idempotency key on create. - Data model — Orders, OrderLines, Products, Customers; indexes for the main queries.
- High-level design — SPA → CDN; API behind a load balancer (stateless, scale out); SQL primary + read replica; Redis cache; Service Bus queue for emails/invoices.
- Deep dive — one hard part: payment + stock consistency (outbox pattern, idempotency), or caching strategy.
- Reliability & ops — retries with backoff (Polly /
Microsoft.Extensions.Http.Resilience), health checks, logging, monitoring, alerts. - Trade-offs — say what you would do differently at 100× scale.
text
Browser ─ CDN (SPA files)
│
└─ HTTPS ─> Load balancer ─> API (N instances) ─┬─> SQL Server (primary + read replica)
├─> Redis cache
└─> Service Bus ─> Worker (emails, invoices)