.NET Architecture & System Design Interview Question #199

How would you approach designing a large-scale e-commerce system?

Deployment, Cloud Operations, SRE & Senior System Design Scenarios Senior Advanced

Quick Interview Answer

Start with requirements and workload: catalog size, search traffic, order rate, payment flow, inventory consistency, geography, availability, and latency targets. Then identify bounded capabilities such as catalog, cart, ordering, payment, inventory, shipping, and notification.

Detailed Explanation

Start with requirements and workload: catalog size, search traffic, order rate, payment flow, inventory consistency, geography, availability, and latency targets. Then identify bounded capabilities such as catalog, cart, ordering, payment, inventory, shipping, and notification.

Choose architecture from the requirements rather than starting with microservices. Define data ownership and consistency boundaries, cache read-heavy data, use durable asynchronous workflows where appropriate, and design observability, security, idempotency, failure recovery, and deployment from the beginning.

Code Example

Clients
  |
Edge / Gateway
  |
Catalog -- Cart -- Orders
             |       |
          Inventory Payment
             |       |
           Messaging
             |
      Shipping/Notification

Each boundary has explicit
data and consistency rules.