---
title: "KIP-1123 explained: rack-aware producer partitioning"
description: "KIP-1123 in plain words: how a Kafka producer can send keyless records only to partition leaders in its own zone, cutting cross-AZ traffic. New in 4.4."
url: https://monedula.dev/kafka/kips/kip-1123/
---

# KIP-1123: rack-aware partitioning, keep producer traffic in its zone

Producers and transactions · Shipped · since Kafka 4.4 · status checked November 2026.

KIP-1123 lets the producer send records without a key only to partitions whose leader sits in the producer's own rack or availability zone. In the cloud that cuts the cross-zone traffic you pay for on every produce. It is off by default and needs partitioner.rack.aware=true plus client.rack on the producer.

## At a glance

- Proposal: KIP-1123, Rack-aware partitioning for Kafka Producer
- Status: Shipped. New in Kafka 4.4, off by default (partitioner.rack.aware=false).
- Area: Producers and transactions
- Proposal page: [KIP-1123 on the Apache Kafka wiki](https://cwiki.apache.org/confluence/display/KAFKA/KIP-1123%3A+Rack-aware+partitioning+for+Kafka+Producer)

## Why it was needed

In a cluster spread over three availability zones, leaders are spread evenly, so about two thirds of what a producer sends crosses a zone boundary. Cloud providers bill that traffic. Consumers already had a fix, fetching from the closest replica (KIP-392), but producers must write to the leader, and the default partitioner picked partitions without looking at where their leaders live.

## What it changes

With partitioner.rack.aware=true, the default partitioner chooses its sticky partition for keyless records only among partitions led by a broker with the same rack as the producer's client.rack. Records with a key still hash to their partition as before, so ordering by key is unchanged. If no partition in the producer's rack has a leader, for example after a broker in that zone failed, it falls back to all partitions.

## How to use it

- Set client.rack on the producer to the zone it runs in, matching the brokers' broker.rack values.
- Set partitioner.rack.aware=true. It only helps keyless records and only when every zone hosts leaders.

## Where it stands

Accepted and shipped in Apache Kafka 4.4 (October 2026) as an opt-in setting of the built-in partitioner. Leader placement still decides how much it saves: zones without leaders get no local partitions.

## What comes next

No follow-up is planned. It pairs with KIP-392 on the consumer side, and diskless topics (KIP-1150) go after the same cross-zone bill for replication, which this KIP does not touch.

## See it in the simulator

- [Kafka rack-aware partitioning: partitioner.rack.aware](https://monedula.dev/kafka-simulator/scenarios/rack-aware-partitioning/) (Rack-aware partitioning), step 3: Rack-aware: az-a leaders only. With partitioner.rack.aware=true the default partitioner picks each new sticky partition among the partitions led in client.rack, here p3 and p0. Kafka picks one at random; the simulator alternates so the rotation is visible. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=01.2.5&t=2)
- [Kafka rack-aware partitioning: partitioner.rack.aware](https://monedula.dev/kafka-simulator/scenarios/rack-aware-partitioning/) (Rack-aware partitioning), step 6: Fallback: every partition. The first batch stayed on p0, the sticky partition picked before the outage, even though its leader is now in az-b: the partitioner only re-picks when it switches. Those switches found no leader in az-a and fell back to every partition: p1, then p2. [Open at this step](https://monedula.dev/kafka-simulator/playground/?scenario=01.2.5&t=5)

## Sources

- [KIP-1123: Rack-aware partitioning for Kafka Producer](https://cwiki.apache.org/confluence/display/KAFKA/KIP-1123%3A+Rack-aware+partitioning+for+Kafka+Producer)
- [KIP-392: Allow consumers to fetch from closest replica](https://cwiki.apache.org/confluence/display/KAFKA/KIP-392%3A+Allow+consumers+to+fetch+from+closest+replica)

## Related KIPs

- [KIP-1150 explained: diskless topics in Apache Kafka](https://monedula.dev/kafka/kips/kip-1150/)
- [KIP-405 explained: Kafka tiered storage](https://monedula.dev/kafka/kips/kip-405/)
- [KIP-392 explained: fetch from the closest replica](https://monedula.dev/kafka/kips/kip-392/)
- [KIP-480 and KIP-794 explained: the sticky partitioner](https://monedula.dev/kafka/kips/kip-480/)
