We used a compacted topic, customer-profile, as the source of truth for a cache that several services rebuild on startup. It worked well for months. Then a GDPR deletion request came in, we produced a delete for the customer, and a week later a new service that bootstrapped from the topic still loaded the customer's old address. A month after that, the topic had grown to 180 GB even though we only had 2 million customers.Both surprises came from the same place: compaction is not instant, not com...
Kafka log compaction: tombstones, delete.retention.ms and keys that never disappear
Compacted topics keep the latest value per key, which makes them ideal for state. They also surprise people: deleted keys come back, old values linger, and topics grow forever. How compaction really works and the settings that control it.
This is a paid story
Subscribe to read the full content, access all paid stories, and support the authors.
Add a label
Embed this post
<iframe src="https://www.hibug.me/kafka-log-compaction-tombstones-state-topics" width="700" height="420" frameborder="0" loading="lazy"></iframe>
I started as a Linux administrator in a hosting company and never really left the command line. Today I look after fleets of Linux servers, edge networking and CDN setups for web platforms, and I still do on-call shifts. My posts are the notes I wish I had found at three in the morning: the symptom, the commands that narrowed it down, the actual cause and the change that fixed it. I try to explain what each number in vmstat, iostat or ss output means, so you can reason about your own system instead of copying commands.
Comments
0No comments yet. Be the first to comment!
Sign In to post a comment.