acme-checkout-architecture
1. Overview
The acme-checkout-service handles all purchase flows for the Acme platform: cart management, payment processing, inventory reservation, receipt delivery, and order confirmation. It processes approximately 4,200 transactions per hour at peak load.
The service is a Python FastAPI application deployed as three replicas behind an Nginx ingress. It holds no persistent state itself — all state lives in PostgreSQL (orders), Redis (cart sessions), and the payment provider's ledger.
2. Core services
The checkout service coordinates four downstream systems. Each call is wrapped in a circuit breaker with a 2-second timeout and 3-retry policy.
| Service | Protocol | SLA | Fallback |
|---|---|---|---|
payment-provider |
HTTPS REST | 99.95% | Queue for retry |
inventory-svc |
gRPC | 99.9% | Soft reserve |
notifications-svc |
AMQP (async) | 99.5% | Log + retry next hour |
fraud-svc |
HTTPS REST | 99.9% | Manual review queue |
3. Data flow
A checkout request moves through five stages: cart validation → fraud check → payment authorization → inventory reservation → confirmation dispatch. Each stage writes a structured event to the orders table before calling the next service.