SysPadExamples › E-commerce checkout

E-commerce checkout

Amazon-style storefront: CDN with an edge function for header/redirect checks, WAF + ALB, a web tier, product search, a cart cache, an orders DB and inventory store (in a VPC), an async fulfilment queue, and Stripe.

A VPC-grouped data tier, a CDN-edge function ahead of the origin, and a write-heavy checkout path that pushes the orders DB to a bottleneck.

DNS Route 53 CDN CloudFront Redirect Rewriter Edge Fn Static Assets S3 WAF WAF Load Balancer ALB Web Tier EKS Product Search OpenSearch AT LIMIT Cart / Session ElastiCache Orders DB Aurora AT LIMIT Inventory DynamoDB Payments Stripe AT LIMIT Fulfilment Queue SQS Fulfilment Worker Lambda Order Notifications SNS

How it works

CDN
Four in five product-page requests never reach the origin. The hit rate is the biggest single lever in this design: every point it drops lands on the web tier and the databases behind it.
Redirect Rewriter
Rewrites old product-URL slugs before the cache lookup. A CloudFront Function rather than Lambda@Edge: sub-millisecond, no network access needed, and a fraction of the price.
Web Tier
Stateless pods that orchestrate rather than compute: every request here fans out to search, cart, orders or payments. Because it holds no session state, it can scale from 4 replicas to 30 without coordination.
Cart / Session
Holds cart and session state outside the web tier so any pod can serve any request. Every page view touches it, which is why it carries several times the traffic the checkout path does.
Orders DB
Sized deliberately small against checkout load, and it shows: each order writes twice while order tracking reads from the same instance, so two separate journeys stack here and this saturates before anything else.
Inventory
Decremented by the fulfilment worker, not by the checkout request, so a stock write never sits in the customer path.
Fulfilment Queue
The checkout response returns as soon as the order is durable. Packing, the inventory decrement and the notification all run off this queue, so a slow worker never shows up as checkout latency.

Request flows

Checkout

  1. DNS
  2. WAF
  3. Load Balancer
  4. Web Tier
  5. Cart / Session
  6. Orders DB
  7. Payments
  8. Fulfilment Queue
  9. Fulfilment Worker
  10. Inventory
  11. Order Notifications

Browse & search

  1. DNS
  2. WAF
  3. Load Balancer
  4. Web Tier
  5. Cart / Session
  6. Product Search
  7. Inventory

Order tracking

  1. DNS
  2. WAF
  3. Load Balancer
  4. Web Tier
  5. Orders DB

Other reference architectures

Open this architecture in SysPad · All examples