---
title: "Design: a Kafka-style log"
description: "Design a partitioned log: partition the order you need, replace a failed leader, handle producer retries, save consumer progress, and expire old segments."
canonical_url: "https://fanout.sh/system/archive/partitioned-log-system-design"
md_url: "https://fanout.sh/system/archive/partitioned-log-system-design.md"
last_updated: "2026-11-11"
access: "pro-preview"
---

# Design: a Kafka-style log

Design a partitioned log: partition the order you need, replace a failed leader, handle producer retries, save consumer progress, and expire old segments.

- Access: Fanout Pro (public preview)

## The core idea

A publishing service needs search and analytics to receive the same post changes.

Search may be current while analytics is an hour behind.

## In this lesson

- What are we promising?
- Partition the order we need
- Follow one accepted publication
- Replace a failed leader safely
- Handle producer uncertainty
- Read, apply, then save progress
- Store batches, expire segments
- Size the recovery work
- Run the smaller recovery experiment
- Check a failure, not just a happy path

## Continue reading

Pro unlocks video lessons, visual walkthroughs, full notes, diagrams, case studies, and implementations across the System Design archive.

---
This representation contains public Fanout content only. Protected Pro lessons, account data, billing, checkout, and pricing are not included.

Browse the public content map: https://fanout.sh/sitemap.md
