Event-Carried State Transfer Lab (Interactive)
Compare "fetch on notify" RPC fan-in against self-contained events during a producer outage. Emit order events to subscribers and toggle between thin notifications that call back and fat ECST payloads that carry the state, pricing hop counts and outage blast radius.
Thin Events vs Event-Carried State Transfer
Broadcast one OrderPlaced fact and count the RPC query storm it costs — or saves — per downstream subscriber.
Domain Events
0
OrderPlaced broadcasts
RPC Callback Hops
0
ECST target: always 0
Stuck Tasks
0
blocked by producer outage
Broker Egress
0.0 KB
event + fetch traffic
payload on the wire
{
"specversion": "1.0",
"id": "evt_449201",
"source": "/services/order-engine",
"type": "com.ecommerce.order.placed",
"time": "2026-09-27T19:50:00Z",
"data": {
"orderId": "ord_883920",
"customerEmail": "sarah@example.com",
"totalAmountCents": 12500,
"items": [{ "sku": "KB-01", "qty": 1 }],
"shippingAddress": { "city": "SF", "zip": "94105" }
}
}Subscriber autonomy map
Team autonomy: a new squad subscribes to the existing topic with zero upstream code changes.
Emit events to compare autonomous processing vs the query storm.
Walmart's event bus moves billions of CloudEvents daily precisely because ECST keeps stores' databases out of the read path. The tradeoff is honest: fatter payloads burn broker bandwidth and storage, and you lose the single source-of-truth convenience — so pick choreography for facts and a Temporal-style orchestrator for complex sagas.
How It Works Under the Hood
A thin event says "order 42 changed," forcing each subscriber to fetch the payload from the producer—N subscribers become N RPC hops that couple every consumer’s uptime to the producer’s. Event-Carried State Transfer embeds the relevant state in the event itself (CloudEvents-format, schema-registered), so subscribers process locally and survive producer outages, at the cost of larger messages and the rule that an event must never carry state its producer cannot guarantee. Thin events stay consistent on demand; ECST events keep working when the world breaks.
Core Architectural Principles
- Thin events multiply availability coupling: each subscriber’s lookup is an RPC hop to the producer.
- ECST payload size scales with subscriber needs (KB per event), buying offline processing and outage resilience.
- Schema-governed fat events (CloudEvents + registry) prevent the payload from becoming an unparseable accretion disk.
Pick by coupling: "if the producer is down at 2 a.m., should subscribers still function?"—if yes, carry the state; if the data is huge or hot, send a thin pointer and fetch. Mention versioned schemas as the tax on fat events and choreography-vs-orchestration as the next question interviewers drill into.
Event-carried state maximizes autonomy and outage tolerance but inflates message size and forces disciplined schema evolution.