internalsGet Pro

System Design · Module 11

Queues, background jobs and event streams

Lessons
15
Free
0
Reading
~5 h

Your progress

0 / 15 lessons done

Sign in to track

Lessons

  1. Asynchronous processing: moving work off the request pathA slow email provider should not delay checkout. Moving work into the background separates those failures, but creates obligations to store, retry and monitor the work.18 min
  2. Job queues vs event streamsBackground workers often start with one queue. Adding another business function can silently split work that both functions needed to receive.19 min
  3. Delivery guarantees: at-most-once, at-least-once, exactly-onceWorkers crash after saving results, and network timeouts hide successful operations. You need to know when to retry and where duplicate protection must live.19 min
  4. Event schemas: evolving events without breaking consumersServices deploy independently, but their events remain in queues, logs and archives. A harmless-looking field change can stop receipts or silently corrupt financial reports.19 min
  5. Pub/sub: delivering one event to many consumersOne business event often starts work in several services. Pub/sub separates those responsibilities, but subscription boundaries determine whether work is shared, duplicated or missed.18 min
  6. Postgres as a job queue: SKIP LOCKEDA service can use its existing database to schedule durable background work. The difficult parts are concurrent claiming, crash recovery and protecting database capacity.19 min
  7. Queue lag: detecting and handling backlogsA queue can accept work long after workers stop keeping up. You need to detect the growing delay before customers miss receipts, exports or notifications.19 min
  8. Dead-letter queues: isolating failing messagesBackground workers need a way to stop retrying broken work without losing evidence. You will use dead-letter queues to keep valid jobs moving and make failed jobs recoverable.18 min
  9. Kafka: partitions and consumer groupsKafka applications often fail because their partition keys, consumer groups and saved progress do not match their processing rules. These choices determine whether adding workers helps and what happens after a crash.18 min
  10. Stream processing: computing over live dataLive dashboards, rolling scores and operational alerts need answers before all their input has arrived. You must define when an answer appears, when it changes and how recovery avoids counting twice.20 min
  11. Event sourcing and CQRSOrder histories and read-optimized screens often need different representations of the same business facts. These patterns help you separate them, but also create new responsibilities around concurrency, replay and stale reads.20 min
  12. Distributed job schedulingReports, renewals and cleanup jobs must survive deployments and outages. Their hardest failures happen between deciding that work is due and recording that somebody must do it.19 min
  13. Workflow orchestration: multi-step jobs as DAGsImports, media processing and fulfillment often need several jobs to finish in a particular order. Orchestration makes that order explicit and gives operators a durable record of unfinished work.20 min
  14. Design: a notification serviceNotifications cross several failure boundaries before reaching a person. You need to separate saved work, provider acceptance and delivery, then decide what to retry at each boundary.30 min
  15. Design: a durable event log like KafkaEvent infrastructure becomes part of your data system. Its acknowledgement rules, recovery behavior and retention policy determine whether downstream services can trust and rebuild their state.30 min

Practise with

Terms this module teaches 44

Open glossary

Ambiguous submission

An external operation whose outcome is unknown because the caller did not receive or save conclusive evidence.