DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
| Table of Contents |
|---|
This page is meant as a template for writing a KIP. To create a KIP choose Tools->Copy on this page and modify with your content and replace the heading with the next KIP number and a description of your issue. Replace anything in italics with your own description.
Status
Current state: "Under Discussion"
...
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Motivation
Partition replicas placement is a important topic in Kafka. Depending on different use cases, users may prefer different placement strategies. Currently, Kafka uses the default StripedReplicaPlacer, which implement round-robin algorithm to distribute replicas. This approach works well for the majority of scenarios.
However, there are still special cases—such as internal testing or experimental features—where users may want to define a custom placement strategy. Therefore, we propose providing a mechanism that allows users to implement their own ReplicaPlacer.
Previously, KIP-660: Pluggable ReplicaPlacer proposed making the ReplicaPlacer pluggable, but the proposal was rejected. The main concern was that an intelligent placement strategy might require a full view of the cluster, which could be prohibitively expensive in large deployments. Furthermore, such implementations could become overly complex and might introduce latency that impacts the controller thread, thus affecting system stability.
Nevertheless, we can make the ReplicaPlacer an internal pluggable component. This means the mechanism would not be exposed to external users, but could be utilized in internal testing, special-purpose scenarios, or controlled experiments. By allowing different implementations to be injected internally, we can make the placement logic more flexible for testing purposes, without compromising the stability of the controller.
Public Interfaces
New broker configuration:
- Class: ReplicationConfigs
- Name: internal.replica.placer.class.name
- Type: string
- Default: StripedReplicaPlacer
- Valid Values: non-empty string
- Doc: The fully qualified class name of the ReplicaPlacer implementation. This class is used by the broker to determine the placement of replicas when topics or partitions are created.
Proposed Changes
Add a new internal configuration: internal.replica.placer.class.name. This configuration allows users to define a custom ReplicaPlacer implementation.
...