Tools

Pipeline patterns lab

One morning's claim events, eight pipeline patterns. Choose what goes wrong (a consumer down, a delivery repeated, a logic change) and see what each pattern does with it: how long a claim waits, what it costs, and what breaks.

Pattern to play
Micro-batch interval
Deduplication key
Schema change with the fix
ELT's raw zone
What happens
Each pattern on the morning's ten claim events. Compute is illustrative: seconds of work, counting an always-on job for the whole half hour.
PatternAverage waitLongest waitCompute When something failsWhen a delivery repeatsWhen the logic changes
ETL 51 min 22 s 62 min 50 s 5 min A failed run is run again: it extracts all 10 events from the source Extracted rows are loaded by event id, so a second copy replaces the first All 10 events extracted again from the source
ELT 51 min 22 s 62 min 50 s 5 min The raw zone keeps all 10 rows; 2 roles can read the health note there Raw rows are kept as delivered; the SQL keeps one row per event id The SQL runs again on the 10 raw rows: 0 source reads
Event-at-a-time streaming 37 s 1 min 15 s 30 min A burst at 09:15 builds a queue: 1 event waits in the log (backpressure), the slowest takes 75 s A repeat adds the amount twice to its window unless the state remembers event ids Only events after the deploy get the fix; earlier ones keep the old totals unless replayed
Micro-batch 3 min 17 s 5 min 23 s 2 min A failed batch is retried from the last checkpoint: 5 batches, 100 s of overhead A retried batch rewrites its own output, so the sink must merge by event id Only events after the deploy get the fix; earlier ones keep the old totals unless replayed
Lambda architecture 37 s 1 min 15 s 35 min The speed view is short by €120 until the nightly batch overwrites it Both layers must deduplicate, each in its own code The fix is written twice: 3 rules, 6 test suites
Kappa architecture 37 s 1 min 15 s 35 min A restarted job reads on from its checkpoint; nothing is lost while the log keeps the events The replay reads every event again, so the job must merge by event id Replay 10 events through the new job: the view becomes €17,570
Fan-out 36 s 5 min 10 s 6 min 40 s By 09:16 fraud scoring has handled 6 events and the search index 4; 1 set aside, 0 never reached Each consumer sees the repeat once more, and each must deduplicate on its own Each consumer deploys and replays on its own, from its own offset
Event-driven 10 s 10 s 4 min A handler that fails is retried; after its retries the event waits in the dead-letter queue 12 deliveries, 2 repeats: 10 letters sent, 2 skipped New events get the new handler; letters already sent stay sent, so nothing is replayed
Playback speed

The ten events are the ones every page of the Theory section works by hand: ten claims reported between 09:01 and 09:24, one on a policy that does not exist, one in pounds with health details, one delivered nine minutes late. Read a pattern's page to see each number worked out.

Try this

0 of 4 done

Choose Micro-batch and switch the interval from 10 to 5 to 1 minute.

Look for: The average wait falls and the overhead rises: more batches, each paying the same fixed cost.

Choose Fan-out with the search index down, then switch the consumers to coupled.

Look for: Isolated, only search waits; coupled, fraud scoring and the letters wait with it.

Choose Event-driven and set the deduplication key to none, then to the delivery's id, then to the event's id.

Look for: Twelve letters, twelve, then ten: only a key that belongs to the event makes the handler idempotent.

Choose Kappa with the currency fix, then switch the schema change to a renamed required field.

Look for: The replay rebuilds the view; with a breaking schema the new code cannot read the old events.

An unhandled error has occurred. Reload 🗙

Reconnecting…

Your connection to the Cloud Data Architecture Lab dropped, probably a Wi-Fi blip. Hold on while it reconnects.

The connection could not be restored. The page will reload in a few seconds.