Perform a throttled Kafka partition reassignment without overloading brokers

domain: kafka · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Generate a reassignment JSON file that maps each partition to its new replica list: kafka-reassign-partitions.sh --generate --topics-to-move-json-file topics.json --broker-list '1,2,3' > reassignment.json
  2. Execute the reassignment with a bandwidth throttle in bytes per second: kafka-reassign-partitions.sh --bootstrap-server localhost:9092 --execute --reassignment-json-file reassignment.json --throttle 52428800
  3. Monitor progress: kafka-reassign-partitions.sh --verify --reassignment-json-file reassignment.json; re-run periodically until all partitions report 'completed'
  4. Adjust the throttle mid-flight if lag builds up: re-run --execute with the same JSON and a new --throttle value without stopping the reassignment
  5. After --verify reports completion it automatically removes throttle configs; if you cancel early, manually clear them with kafka-configs.sh --alter --delete-config 'leader.replication.throttled.replicas' on each affected topic
  6. Confirm inter-broker replica lag has returned to zero by checking the under-replicated partitions JMX metric

Known gotchas

Related routes

enable and operate kafka cruise control for automated partition rebalancing and safe broker decommissioning
github.com · 5 steps · unrated
Set per-client producer and consumer bandwidth quotas in Kafka
kafka · 6 steps · unrated
Configure Kafka consumer group cooperative sticky rebalancing
kafka.apache.org · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans