이 콘텐츠는 선택한 언어로 제공되지 않습니다.

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
    # ...

    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.

    ./bin/kafka-server-start.sh -daemon ./config/kraft/server.properties
  3. Verify that the Kafka broker is running.

    jcmd | grep Kafka
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.