The log, partitions, replication, consumer groups, exactly-once semantics, and stream processing on top.
What Is a Log? — A log is an append-only, totally ordered sequence of records: the same structure behind database replication, state machine replication and consensus, and the reason tables and event streams are two views of one thing. (8 min read)
Data Integration and the N² Problem — Point-to-point pipelines between every pair of systems grow as N²; a shared log turns that into N connections, which is the problem LinkedIn built Kafka to solve. (9 min read)
Stream Processing and State Management — A stream processor reads a log, does some work and writes another log. Local state backed by a changelog topic is what makes it fast, recoverable and co-partitioned. (16 min read)
System Building and Log-Centric Architecture — The log as an organisation's nervous system: queue vs. log, log compaction, the five design pillars of a scalable log, consumer groups and what really caps throughput. (19 min read)
The Payment Pipeline and Its Partition Count — The design problem, a 500k events/sec exactly-once payment pipeline, and how to size its topic's partition count from throughput, consumers and key skew. (4 min read)
Replication Factor, min.insync.replicas and Acks — Why RF=3 with min.insync.replicas=2 and acks=all is the combination that survives a broker loss without losing an acknowledged payment. (3 min read)
Consumer Group Configuration — One consumer group per independent use (fraud, analytics, audit), and the offset-commit, poll and session settings that decide duplicates and stalls. (6 min read)
Exactly-Once Semantics: Scope and Limits — Kafka's exactly-once covers work that stays inside Kafka. A card charge, database write or email can still happen twice, so you make those idempotent yourself. (7 min read)
Broker Failover, Minute by Minute — What happens second by second when a broker in the payment cluster dies: detection, leader election, producer retries and consumers resuming. (1 min read)
Commit Semantics — What "committed" means in Kafka: the path of one acks=all produce, the high watermark, and how the new leader's log wins when a leader crashes mid-replication. (8 min read)
Consumer Group Rebalancing: Eager vs. Cooperative — Eager rebalancing stops every consumer; cooperative rebalancing (KIP-429) moves only the partitions that change owner, and static membership avoids rebalancing on restarts. (4 min read)
Exactly-Once Semantics: The Two-Layer Mechanism — Layer 1, the idempotent producer, dedups retries with a producer id and sequence numbers; layer 2, transactions, commits consume-transform-produce atomically across partitions. (14 min read)
Throughput vs. Latency: Partitions — More partitions raise throughput roughly linearly but do not cut per-message latency, slow failover, and give up global ordering. (4 min read)
Zero-Copy I/O — How sendfile() lets the kernel move bytes from the page cache to the network card without passing through the JVM, and when TLS takes that win away. (5 min read)
How the Internals Entangle — Commit semantics, rebalancing, exactly-once, partition count and zero-copy interact, and the interactions are where production incidents come from. (1 min read)
The Multi-Master Problem — Two regions both accepting writes: why active-active creates conflicts a single leader never has, and how hybrid logical clocks order entries without trusting wall clocks. (5 min read)
Option 1: Synchronous Consensus — Ask the other region before committing: no conflicts, but every write pays a cross-continent round trip, the Spanner and CockroachDB trade. (1 min read)
Conflict Resolution Strategies — Last-writer-wins, vector clocks and the log-vs-state distinction, and why no option is fast, consistent and simple at once. (4 min read)
Depth Checklist and Self-Test — The questions you should be able to answer without notes, then a self-test on the internals with worked answers. (3 min read)
Commit and Split Brain: Two Leaders, One Official Log — Commit is a pointer the leader moves once a majority holds an entry. Followed through a network split, it shows why only the majority side can ever tell a client "success". (9 min read)
The High Watermark, Step by Step — The leader computes the high watermark as the smallest log end across in-sync replicas; followers learn it a round late, and a stale copy after a crash is harmless. (7 min read)
Inside the Streams Commit Cycle — Kafka Streams flushes its cache to RocksDB and the changelog, then commits the input offset, with nothing making those writes atomic until exactly_once_v2. (8 min read)
Restore Internals: The Checkpoint File — A small .checkpoint file on local disk records how far RocksDB has been restored; under exactly-once it is written only on clean shutdown, so a crash means a full replay. (3 min read)
Commit-Cycle Failure Scenarios, Traced — Every failure is the changelog drifting ahead of the committed offset: mostly bounded over-counting, except the zombie writer that corrupts the changelog itself. (4 min read)
Flink Checkpoints: How Exactly-Once Is Achieved — Exactly-once is a claim about state: Chandy-Lamport snapshots, Flink's barrier snapshotting, alignment, unaligned checkpoints, state backends and recovery by rewind and replay. (18 min read)
Flink Exactly-Once: Sinks, Kafka and Limits — Where internal exactly-once stops: idempotent vs. transactional sinks, wiring Flink to Kafka end to end, how it compares with Kafka Streams, and the knobs that trade latency for safety. (13 min read)
Local State by Example: The Basics — Same key, same machine, a small local database and a changelog topic to rebuild it: the seven ideas and four shapes of state every stateful stream job uses. (6 min read)
Local State in Six Real Systems — Card fraud, Uber surge pricing, Netflix Continue Watching, LinkedIn feed ranking, ad capping and DoorDash order tracking, each built from key, local store and changelog. (26 min read)
Lab: Count per User per Hour with Kafka Streams — A hands-on lab: build a one-hour tumbling-window count in Kafka Streams, then inspect its RocksDB store and changelog, query it live, and handle late data. (10 min read)