Library / Blogs
REA Group Blog
The engineering and technology blog of REA Group: posts on how it designs, builds and scales its systems.
By REA Group engineers · REA Group · Added 2026-10-12
All content belongs to REA Group engineers / REA Group. We only link to it and give credit. Report a problem
Learn this article
About 37 min left. Your work is saved as you go.
What you are about to study
REA Group wrote this to explain how they thought about a problem. You should know the basics: caching, queues and replication.
Ideas you will meet
- Distributed Systems
- Consensus, time, failure and the fundamentals of scale-out.
What we already know about this
Our own lessons on these ideas. Read them here before you start, so it makes sense.
Core Concepts: How Things Actually Work · 7 minWhy Kafka is fastSequential disk writes, batching, zero-copy and partitions: the design choices behind its throughput.Read here
What Kafka is
Kafka is a distributed commit log: producers append messages to topics, and consumers read them at their own pace. Messages are kept for a retention period, not deleted when read, so many consumers can read the same data, and replay it.
Why it is so fast
- Sequential I/O. Each partition is an append-only log. Writing to the end of a file and reading in order is vastly faster than random access.
- The page cache. Kafka relies on the operating system's cache rather than its own heap, so recent data is served from memory without extra copying or garbage collection.
- Batching. Producers and brokers group many messages per request, and data is compressed per batch, amortising network and disk costs.
- Zero-copy transfer. The broker can send data from the file cache to the network socket without copying it through application memory.
- Partitioning. A topic is split into partitions spread over brokers, so reads and writes happen in parallel.
- A simple model. The broker mostly appends and serves byte ranges. Consumers track their own position (the offset), so the broker does little bookkeeping per message.
100%Figure SDA-CORE-10-1 · Why it is so fast · © forcsguy.com
100%Figure SDA-CORE-10-2 · Zero-copy: fewer trips through memory · © forcsguy.com
Ordering and parallelism
- Order is guaranteed within a partition, not across a whole topic.
- The message key decides the partition, so related events (same customer) stay in order.
- A consumer group shares partitions: each partition is read by exactly one consumer in the group. More partitions allow more parallel consumers.
Reliability
- Each partition is replicated to several brokers: one leader and followers.
- Producers choose an acknowledgment level (
acks): faster with fewer, safer with all in-sync replicas. - Consumers commit offsets after processing. If they crash, they resume from the last committed offset, so processing is at-least-once and handlers should be idempotent.
When to use it, and when not
Good for event streams, log and metric pipelines, and decoupling systems with replayable history. A plain task queue (RabbitMQ, SQS) can be simpler when you only need work distribution and no replay.
More on this site
Related reading
- Kafka Source & DocsApache Software Foundation · apacheGitHub
- LinkedIn Engineering BlogLinkedIn engineers · LinkedInBlogs
- Confluent BlogConfluent engineers · ConfluentBlogs
- Uber Engineering BlogUber Engineering · UberBlogs
Show 6 moreShow fewer
- Finding Kafka throughput limit in infrastructure at DropboxDropbox engineers · DropboxCase Studies
- Kafka - Message BrokerKleppmannPapers
- LinkedIn Engineering: DataLinkedIn engineers · LinkedInBlogs
- Kafka on PaaSTA: Running Kafka on Kubernetes at Yelp (2 parts)Yelp engineers · YelpCase Studies
- Freeletics Engineering BlogFreeletics engineers · FreeleticsBlogs
- Findmypast Engineering BlogFindmypast engineers · FindmypastBlogs
Go deeper on this
A path through videos, articles, other case studies and code on the same ideas as REA Group Blog.
Warm upGet the vocabulary first.
Books · Free from the author
Concurrent and Distributed Systems (Cambridge lecture notes)
Eight lectures on time, broadcast, replication, consensus and transactions, with notes, slides and video. Free from the author under CC BY-SA.
University of CambridgeIntermediate
Books · Free from the author
Computer Networks: A Systems Approach
How networks are built and why: protocols, routing, congestion control and the internet's architecture. The authors publish it free online under CC BY 4.0.
Systems ApproachIntermediate
WatchHow others solve the same problem, on video.
Videos belong to their creators and play from YouTube. More on YouTube (opens in a new tab)
ReadEngineers explain it in their own words.
Blogs · Free from the author · Read here
Scalable Web Architecture and Distributed Systems
A full chapter on the building blocks of large websites: availability, performance, reliability, scalability, caches, proxies, indexes, load balancers and queues. Free to read here under CC BY 3.0.
The Architecture of Open Source ApplicationsBeginner40 min
Papers · Read here
Facebook’s photo storage
This paper describes Haystack, an object storage system optimized for Facebook’s Photos application. Facebook currently stores over 260 billion images, which translates to over 20 petabytes of data.
USENIXIntermediate
See it in another companyThe same ideas, a different system.
Case Studies · Read here
Aroma: Using ML for Code Recommendation at Facebook
Thousands of engineers write the code to create our apps, which serve billions of people worldwide. This is no trivial task—our services have grown so diverse and complex that the codebase contains…
FacebookIntermediate
Case Studies · Read here
Brooklin: Distributed Service for Near Real-Time Data Streaming at LinkedIn
Brooklin—a distributed service for streaming data in near real-time and at scale—has been running in production at LinkedIn since 2016, powering thousands of data streams and over 2 trillion messages per day. Today, w...
LinkedInIntermediate
Read the codeSee how it looks when it is real.
GitHub
Engineering Blogs
A huge directory of company engineering blogs to learn from real production systems.
kilimchoiIntermediate
GitHub
Awesome Scalability
Curated reading list of articles on the architecture of scalable, reliable systems.
binhnguyennusIntermediate
Keep learning
Loading community…