Tune Kafka Streams standby replicas and RocksDB changelog compaction for fast task failover

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

Steps

  1. Set num.standby.replicas in the StreamsConfig to 1 or 2; Kafka Streams will maintain shadow copies of each state store on that many additional instances, continuously consuming the changelog topic
  2. Ensure changelog topics use log compaction (default for Kafka Streams); confirm with kafka-topics.sh --describe that cleanup.policy=compact is set on the state store changelog topic
  3. Tune RocksDB compaction via a custom RocksDBConfigSetter: reduce write_buffer_size and increase max_write_buffer_number if memory is constrained; increase block_cache_size for read-heavy aggregations
  4. Set rocksdb.config.setter=com.example.MyRocksDBConfig in the Streams properties and implement the RocksDBConfigSetter interface to apply per-store tuning
  5. Simulate a task migration: kill one Streams instance and confirm the standby on another instance transitions to active within seconds (check the task assignment log)
  6. Monitor restore lag via the kafka_streams_state_store_restore_remaining_records JMX metric; alert if standby lag grows beyond an acceptable threshold

Known gotchas

Related routes

Configure Kafka Streams RocksDB state store with custom block cache and bloom filter settings to optimize read performance for large state
kafka.apache.org · 5 steps · unrated
Configure RocksDB state backend in Flink with incremental checkpoints for large stateful streaming applications
nightlies.apache.org/flink · 6 steps · unrated
Configure Kafka Streams to handle topology changes between versions using a state store migration and changelog topic rebuild strategy
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