internalsGet Pro

Module 09 · Lesson 10 of 14Pro

Partition keys and ordering guarantees

Level
Advanced
Topic
Event streaming with Kafka
Reading time
18 min

When you finish this page you can

  1. Choose a partition key per topic from the smallest unit whose order matters, and name what that key costs.
  2. Measure per-partition rates, find the key behind a hot partition, and pick a fix knowing what it breaks for ordering.
  3. Explain why adding partitions moves keys, and change a key or a partition count safely with a new topic and a cut-over.
  4. Keep retries from reordering records with the idempotent producer and at most 5 requests in flight.

Builds on 2 lessons

Start with lesson 317 min
  1. Kafka producers: keys, batching and acknowledgements17 min
  2. Kafka consumers: groups, commits and rebalancing17 min

One partition takes six times its share

is an online store in India. Its apps send about 200 million click events a day to the Kafka topic kartly.clicks, and the order database’s changes flow through Kafka too. Meera, a data engineer, owns the pipelines that read them: the S3 sink, the “trending now” counter and, from tomorrow, the festival sale’s live dashboard.

Our biggest sale ever · Black Friday

Flat 50% Off

Pro

Continue reading

Unlock every course, now and later

  • System Design, live
  • AI Engineering, live
  • Data Engineering, live
  • Machine Learning Engineering, live
  • Inference Engineering, coming soon
  • AI Research, coming soon
  • Performance Engineering, coming soon
  • Agent & Harness Engineering, coming soon
  • LLM Fine-tuning, coming soon
  • LLM Pre-training & Post-training, coming soon
  • Reinforcement Learning, coming soon
  • AI Infrastructure & Platform Engineering, coming soon
  • AI Evaluation & Safety, coming soon
  • Forward Deployed Engineering, coming soon
  • Cloud Computing, coming soon
  • DevOps, coming soon

50% off · Annual and Lifetime

BLACKFRIDAY50Applied at checkout

Choose a plan