GitHub user allenxwang opened a pull request: https://github.com/apache/kafka/pull/132
KAFKA-1215: Rack-Aware replica assignment option The PR tries to achieve the following: - Make rack-aware assignment and rack data structure optional as opposed to be part of the core data structure/protocol to ease the migration. The implementation of that returns the map of broker to rack is pluggable. User needs to pass the implementation class as a Kafka runtime configuration or command line argument. - The rack aware replica assignment is best effort when distributing the replicas to racks. When there are more replicas than racks, it ensures each rack has at least one replica. When there are more racks than replicas, it ensures each rack has at most one replica. It also tries to keep the even distribution of replicas among brokers and racks when possible. You can merge this pull request into a Git repository by running: $ git pull https://github.com/allenxwang/kafka KAFKA-1215 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/132.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #132 ---- commit 3cccc5db23ee7987a1811d630f14de66a99ce638 Author: Allen Wang <aw...@netflix.com> Date: 2015-08-11T17:52:37Z KAFKA-1215: Rack-Aware replica assignment option ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---