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 | Average wait | Longest wait | Compute | When something fails | When a delivery repeats | When 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 | 2 min 52 s | 10 min 30 s | 6 min 40 s | By 09:16 fraud scoring has handled 3 events and the search index 3; 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 |
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.
Used in
Glossary: ETLELTMicro-batchFan-outIdempotentDead-letter queue