Checkout with change feeds
Separate transactional order writes from analytical reads using change feeds and read replicas.
Kata overview
You do not need to be an expert to start. This kata keeps the stakes low so you can explore trade-offs, adjust the diagram, and see how the system responds.
What this system design kata asks of you
Parcelwise has two audiences for order data: customers who need fast order status, and analysts who need rich order history. Today they share one database and it hurts. The solution is CQRS - separate the write model (order creation and updates) from the read models (status API via read replica, analytics via change feed). The database's read replica feature and change feed feature are both available in the component palette. The user must wire them correctly: replication edges for the replica, change feed edges for the analytics path. The engine's "read/write split missing sync" lint rule will catch the most common mistake - adding a replica without connecting it.
Operational pressure
- No manual cache clearing or DB restarts.
- Analytics queries must not affect order API latency.
Customer and product constraints
- Read replicas and change feeds are available in the palette.
- The extra infra must cost less than the hourly hiccup costs in lost productivity.
Checkout with change feeds
E-commerce · 30–45 min
Trade-offs to explore in the simulator
- Keep order submission fast and unaffected by read traffic.
- Serve order status reads from an isolated replica.
- Feed order data to analytics without touching the primary database.
- Keep data consistent across all read paths.
What you will learn
- Use read replicas to isolate read traffic from write traffic.
- Use change feeds to propagate data to analytical systems without touching the primary.
- Wire replication and change feed edges correctly between data components.
- Understand that the "missing sync path" lint catches disconnected replicas.
Open Checkout with change feeds in the simulator
Sketch your first design, run the traffic and see what the review says. No signup required.