Chapter 13. Setting throughput and storage limits on brokers


Important

This feature is a technology preview and not intended for a production environment. For more information see the release notes.

This procedure describes how to set throughput and storage limits on brokers in your Kafka cluster. Enable the Strimzi Quotas plugin and configure limits using quota properties

The plugin provides storage utilization quotas and dynamic distribution of throughput limits.

  • Storage quotas throttle Kafka producers based on disk storage utilization. Limits can be specified in bytes (storage.per.volume.limit.min.available.bytes) or percentage (storage.per.volume.limit.min.available.ratio) of available disk space, applying to each disk individually. When any broker in the cluster exceeds the configured disk threshold, clients are throttled to prevent disks from filling up too quickly and exceeding capacity.
  • A total throughput limit is distributed dynamically across all clients. For example, if you set a 40 MBps producer byte-rate threshold, the distribution across two producers is not static. If one producer is using 10 MBps, the other can use up to 30 MBps.
  • Specific users (clients) can be excluded from the restrictions.
Note

With the plugin, you see only aggregated quota metrics, not per-client metrics.

Prerequisites

Procedure

  1. Edit the Kafka configuration properties file.

    Example plugin configuration

    # ...
    client.quota.callback.class=io.strimzi.kafka.quotas.StaticQuotaCallback 
    1
    
    client.quota.callback.static.produce=1000000 
    2
    
    client.quota.callback.static.fetch=1000000 
    3
    
    client.quota.callback.static.storage.per.volume.limit.min.available.bytes=500000000000 
    4
    
    client.quota.callback.static.storage.check-interval=5 
    5
    
    client.quota.callback.static.kafka.admin.bootstrap.servers=localhost:9092 
    6
    
    client.quota.callback.static.excluded.principal.name.list=User:my-user-1;User:my-user-2 
    7
    
    # ...
    Copy to Clipboard Toggle word wrap

    1
    Loads the plugin.
    2
    Sets the producer byte-rate threshold of 1 MBps.
    3
    Sets the consumer byte-rate threshold. 1 MBps.
    4
    Sets an available bytes limit of 500 GB.
    5
    Sets the interval in seconds between checks on storage to 5 seconds. The default is 60 seconds. Set this property to 0 to disable the check.
    6
    Kafka cluster bootstrap servers address. This property is required if storage.check-interval is >0. All configuration properties starting with client.quota.callback.static.kafka.admin. prefix are passed to the Kafka Admin client configuration.
    7
    Excludes my-user-1 and my-user-2 from the restrictions. Each principal must be be prefixed with User:.

    storage.per.volume.limit.min.available.bytes and storage.per.volume.limit.min.available.ratio are mutually exclusive. Only configure one of these parameters.

    Note

    The full list of supported configuration properties can be found in the plugin documentation.

  2. Start the Kafka broker with the default configuration file.

    su - kafka
    /opt/kafka/bin/kafka-server-start.sh -daemon /opt/kafka/config/kraft/server.properties
    Copy to Clipboard Toggle word wrap
  3. Verify that the Kafka broker is running.

    jcmd | grep Kafka
    Copy to Clipboard Toggle word wrap
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat