Nodivex from TraitSpan
Intermediate–Advanced

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.

E-commerce30–45 min

Context for this system design kata

Separate transactional order writes from analytical reads using change feeds and read replicas. This system design kata keeps the stakes low so you can rehearse trade-offs before taking ideas into production reviews.

Scenario and practice focus

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.

Difficulty: Intermediate–Advanced. Estimated time: 30–45 min. Domain: E-commerce.

Constraints to balance

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.

Scenarios to explore in the simulator

Trade-off prompts
  • 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.

Learning outcomes

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.
Ready to run
Open this kata in the simulator.

Give it a try!

Open the app