The Trade-Offs of Adaptive Key Salting in Kafka

At 2:14 AM, nine of your ten Kafka consumers are idle. The tenth is pinned at 100% CPU, its lag climbing by the second, and the coordinator has started evicting it for missing max.poll.interval.ms. Every eviction triggers a rebalance. Every rebalance stops the other nine consumers cold for the duration. You didn't lose a broker. You didn't lose a data center. You partitioned by user_id. I've operated production streaming systems where this exact failure shows up under load. Not because anyone wrote bad code, but because hash(user_id) % num_partitions encodes an assumption that almost never holds: that traffic distributes uniformly across keys. It doesn't. It follows a power law, and the gap
…