Streams, logs and delivery guarantees
Ordered, replayable event logs and what "exactly once" really means.
15 min readThe 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.