Dashboard
Courses
Problems
Badges
Theme
Sign inStart free
Courses/Asynchronous and Event-Driven Systems
Lesson 4 of 20

Streams, logs and delivery guarantees

Ordered, replayable event logs and what "exactly once" really means.

15 min read

The log

A stream (such as Kafka) is an append-only log split into partitions. Messages within a partition keep their order, consumers track their own offset, and they can replay from any point. That makes logs ideal for analytics, audit trails and rebuilding state.

Delivery guarantees

Networks fail mid-request, so a system must choose what happens to a message in doubt.

  • At most once: never duplicated, sometimes lost
  • At least once: never lost, sometimes duplicated (the usual choice)
  • Effectively once: at-least-once delivery plus idempotent processing

Keeping analytics off the hot path

Counting clicks or recording audit events should not slow down the main request. Emit an event to a stream and let consumers aggregate it later, at their own pace.

Key takeaways

  • Logs preserve order per partition and allow replay
  • At-least-once plus idempotency is how real systems get "exactly once"
  • Emit events asynchronously to keep the request path fast

Sign in to track lessons and earn badges.

Pub/sub and fan-outMessage brokers compared

Coming up

Course: 0/20 lessons · 0/10 challenges0%

Build it on the canvas, pass the review (70+) and mark it complete to count it toward the course badge.

  1. 2/10Design a Notification SystemFan notifications out to slow providers with idempotent sends, backoff with jitter and a dead-letter queue.Medium
  2. 3/10Design a Newsletter SenderDrain 5 million sends through a rate-limited email provider without overwhelming it or sending twice.
Easy
All 10 challenges →