Monedula
Kafka guide contents

Markdown

Part VI · Reference

Kafka Improvement Proposal

KIP-13: client quotas, throttle instead of fail

Cluster and operations · Shipped · since Kafka 0.9 · status checked November 2026

KIP-13 added quotas to Kafka: a cap on how many bytes per second a client, or a user, can produce or fetch from each broker. A client over its quota is not rejected; the broker delays its response so its average rate drops back under the limit. Later KIPs added a quota on request time and an admin API to manage quotas.

Proposal
KIP-13, Quotas
Status
Shipped Since Kafka 0.9 (2015); throttling reworked in 2.0 (KIP-219), admin API in 2.6 (KIP-546).
Area
Cluster and operations
Over budget - throttled 1000 ms. A fresh window: p1 flushes FOUR records at once (4096 bytes = double the 2048-byte budget). The broker throttles p1 for (4096−2048)/2048×1000 = 1000 ms. The card reads 'throttled · 1000 ms', and the simulator holds the batch back: the log still shows only the two earlier records. (Real Kafka appends the batch, returns a throttle time and holds p1's next requests instead.) Open this step in the full playground

Why it was needed

Without quotas one runaway producer or a consumer replaying a whole topic could use all of a broker's network and disk, and every other client on the cluster would slow down with it. In a shared, multi-tenant cluster there was no way to protect teams from each other.

What it changes

Quotas are set per user, per client id or both, and apply per broker: producer_byte_rate, consumer_byte_rate and request_percentage, the share of broker thread time. The broker measures rates over short windows. Since KIP-219 (Kafka 2.0) it answers at once with the throttle time and then mutes the connection for that long, and the client also holds back, so a throttled client sees higher latency, never an error.

How to use it

  • Set quotas with kafka-configs.sh --alter --entity-type users or clients --add-config producer_byte_rate=1048576, or through the Admin API (KIP-546).
  • Use --entity-default for a default per user or client; the static quota.producer.default settings were removed in Kafka 3.0.

Where it stands

Shipped in Kafka 0.9 and extended since: request-time quotas in 0.11, the throttling rework of KIP-219 in 2.0, and the describeClientQuotas and alterClientQuotas admin calls of KIP-546 in 2.6. Quotas work the same on KRaft clusters.

What comes next

Stable. Kafka 4.4 deprecated one method of the pluggable quota callback, to be removed in 5.0. Replication has its own, separate throttle (KIP-73).

See it in the simulator

Sources

All Kafka KIPs