CPU time measures how much broker processor capacity a client’s requests consume. Kafka exposes it as a request quota, alongside producer and consumer byte-rate quotas. section 13.3
Kafka enforces CPU-time quotas separately on each broker. Because usage is calculated per thread, available capacity equals the combined network and I/O thread capacity multiplied by the configured percentage. section 13.3
Use CPU-time quotas with these operational constraints in mind:
- Prefer user-level quotas when identities must be enforceable; clients can arbitrarily choose their client IDs. section 13.3
- Treat quotas as overload protection rather than billing guarantees, because a client can connect to multiple brokers and exceed its per-broker allocation overall. section 13.3
- Start with a conservative default and grant higher limits only to clients that need additional resources; monitor the result because poorly managed quotas can cause problems. section 13.3
((num.io.threads + num.network.threads) * 100)%
The capacity expression makes the per-thread basis of CPU-time quotas explicit: network and I/O thread counts determine the available request percentage. section 13.3
Protecting an online-shop cluster
A default policy can allocate every client a 100% request rate, while limiting producers to 1 MB/s and consumers to 2 MB/s. A periodic newsletter producer can receive a stricter 50% request quota, and a warehouse consumer can receive a higher 200% quota when its workload requires it. section 13.3



