Why LinkedIn Built Apache Kafka
The origin story of Apache Kafka — how LinkedIn's need to process billions of activity events per day led to the creation of a distributed commit log that.
Quick answer: Why LinkedIn Built Apache Kafka
Why LinkedIn Built Apache Kafka is covered here as a practical system design resource. The origin story of Apache Kafka — how LinkedIn's need to process billions of activity events per day led to the creation of a distributed commit log that. Use it as a curated reference while connecting the original engineering lesson to practical system design decisions.
Focus on the problem being solved, the main design choice, the failure mode, and the tradeoff you would defend in front of a senior engineer. This page is part of the DosiBridge system design knowledge graph, so it links related concepts, interview problems, tradeoffs, and references instead of leaving the topic isolated.
Company Context
In 2010, LinkedIn was processing hundreds of millions of events per day: page views, ad impressions, searches, connection requests, profile updates, and messaging interactions. Each event needed to flow to multiple downstream systems: a Hadoop cluster for batch analytics, a search index for people and job search, a recommendation engine for "People You May Know," an ad serving system, and an activity monitoring dashboard.
The data integration problem was acute. Each source system (web servers, mobile API servers, email systems) needed to send data to each destination system. With 10 sources and 10 destinations, the naive approach required 100 point-to-point data pipelines. Each pipeline was custom-built, fragile, and maintained by a different team.
The Problem at Scale
LinkedIn tried existing messaging systems. ActiveMQ and RabbitMQ were designed for traditional enterprise messaging — reliable delivery of individual messages between applications. They worked for low-throughput transactional workflows but buckled under LinkedIn's event volume.
The specific problems:
- Throughput ceiling. Traditional message brokers store messages on disk with per-message indexing and acknowledgment tracking. At hundreds of thousands of messages per second, broker CPU and disk I/O became bottlenecks.
- Consumer coupling. Adding a new consumer to an existing queue required careful capacity planning. If the new consumer was slow, it could back up the entire queue, affecting all other consumers.
- No replay. Once a message was consumed and acknowledged, it was gone. If a downstream system had a bug and processed messages incorrectly, there was no way to reprocess them.
- Batch vs. real-time gap. LinkedIn ran nightly Hadoop jobs for analytics. The same data that flowed through message queues in real time also needed to land in HDFS for batch processing. Maintaining two separate data pipelines (real-time and batch) for the same data was error-prone and expensive.
Architecture Solution
Jay Kreps, Neha Narkhede, and Jun Rao designed Kafka as a distributed commit log. The key insight: treat the message broker as a log file, not a queue. Messages are appended to the end of the log and retained for a configurable period (not deleted after consumption). Consumers maintain their own position (offset) in the log and can read forward from any point.
This deceptively simple change solved all of LinkedIn's problems.
The Commit Log Model
Each Kafka topic is a partitioned, replicated commit log. Producers append messages to the end of a partition. Consumers read sequentially from their current offset. The log retains messages for a configured retention period (7 days, 30 days, or indefinitely).
Unlike traditional message queues, Kafka does not track which messages have been consumed by which consumer. Each consumer group tracks its own offset — a single integer per partition. This eliminates the per-message bookkeeping that throttled traditional brokers.
Decoupling Through Consumer Groups
Multiple consumer groups can independently consume the same topic. LinkedIn's analytics team, search team, recommendation team, and monitoring team each have their own consumer group. Each group reads the full stream at its own pace. Adding a new consumer group has zero impact on existing consumers — no capacity planning, no queue reconfiguration.
Bridging Batch and Real-Time
Because Kafka retains messages, the same topic can serve both real-time consumers (reading the latest messages as they arrive) and batch consumers (Hadoop jobs that read the entire day's data in bulk). LinkedIn eliminated the dual-pipeline problem by making Kafka the single source of truth for event data. Hadoop ingests from Kafka. The search indexer ingests from Kafka. The recommendation engine ingests from Kafka. One pipeline, many consumers.
This idea — using a log as the central nervous system of a data architecture — was articulated by Jay Kreps in his influential post "The Log: What every software engineer should know about real-time data's unifying abstraction."
Key Technical Decisions
Sequential I/O over random I/O. Kafka writes all data sequentially to disk and reads sequentially. This aligns with how modern storage (both spinning disks and SSDs) achieves maximum throughput. The result: a single Kafka broker on commodity hardware achieves 500-800 MB/s of sustained write throughput.
Consumer-tracked offsets. Moving offset management from the broker to the consumer eliminates the broker's per-message tracking overhead. The broker's job is simple: append messages to the log and serve reads from the log. Consumers commit their offsets periodically (to Kafka itself, in the __consumer_offsets topic).
Replication for durability. Each partition is replicated across multiple brokers. The leader handles reads and writes; followers replicate from the leader. If the leader fails, a follower is promoted. This provides durability without the performance cost of synchronous cross-datacenter writes (replication is within a cluster).
Zero-copy transfers. Kafka uses the OS sendfile() syscall to send data directly from the page cache to the network socket, bypassing application-level copying. This optimization is critical for high-throughput consumption.
Strengths
- Throughput that scales linearly with cluster size
- Full message replay from any point in the retention window
- Complete decoupling between producers and consumers
- Unified platform for both real-time and batch data processing
- Simple broker design (append-only log) with minimal per-message overhead
Weaknesses
- Ordering is only guaranteed within a partition, not across the topic
- Consumer rebalancing during scaling events causes temporary processing pauses
- Operational complexity of managing a Kafka cluster (partition count, retention, replication factor)
- Not designed for low-latency RPC-style messaging (sub-millisecond delivery is not a goal)
Impact on the Industry
Kafka became an Apache top-level project in 2012 and is now used by over 80% of Fortune 100 companies. It spawned an entire category of event streaming platforms. Confluent (founded by Kafka's creators) offers Kafka as a managed service. AWS offers Amazon MSK (managed Kafka). Azure and GCP offer competing event streaming services.
The architectural pattern Kafka enabled — event-driven microservices with a central event log — has become the default for large-scale data-intensive systems. Companies like Uber, Netflix, Airbnb, and Walmart process trillions of events through Kafka daily.
Interview Relevance
Understanding why Kafka was built (not just how it works) demonstrates architectural thinking. When an interviewer asks about event-driven architecture or data pipelines, explaining the transition from point-to-point integrations to a centralized log shows that you understand the problem Kafka solves, not just the technology itself.
Original DosiBridge notes for Why LinkedIn Built Apache Kafka
This section is written specifically for this page, not copied from a general system-design checklist. The useful way to study Why LinkedIn Built Apache Kafka is to connect the concept to an asynchronous workflow where replay, ordering, and poison messages shape the architecture. That framing changes the design discussion from definitions to operating choices.
What makes this topic distinct
- Practice Loop: For Why LinkedIn Built Apache Kafka, decide the practice loop before choosing tools; otherwise the design looks clean but fails when linkedin changes.
- Implementation Exercise: For Why LinkedIn Built Apache Kafka, decide the implementation exercise before choosing tools; otherwise the design looks clean but fails when kafka changes.
- Review Checkpoint: For Why LinkedIn Built Apache Kafka, decide the review checkpoint before choosing tools; otherwise the design looks clean but fails when origin changes.
- Failure Drill: For Why LinkedIn Built Apache Kafka, decide the failure drill before choosing tools; otherwise the design looks clean but fails when linkedin changes.
- Comparison Target: For Why LinkedIn Built Apache Kafka, decide the comparison target before choosing tools; otherwise the design looks clean but fails when kafka changes.
Production review question
If a team adopts Why LinkedIn Built Apache Kafka, what observable signal proves it helped instead of only making the architecture diagram more fashionable?
Practical metric to track
Track linkedin-origin health as a named dashboard or review item: combine one user-facing metric, one saturation metric, and one correctness metric. For Why LinkedIn Built Apache Kafka, this keeps the discussion grounded in behavior that can be measured after deployment instead of generic advice that sounds good in an interview but never gets verified.