-
Notifications
You must be signed in to change notification settings - Fork 558
Dark Cluster Partition Support #1108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dark Cluster Partition Support #1108
Conversation
| } | ||
|
|
||
| @Override | ||
| public int getClusterCountAcrossPartitions(String clusterName, String scheme) throws ServiceUnavailableException |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that all partitions should be handled independently. As in, this method should return Map<Integer, Integer>. The overall host count might not be a good indicator of the traffic multipliers. The same server host can register with multiple partitions at the service owners' discretion. It's possible that some partitions have 10x the number of hosts in the dark cluster while others have only 1x.
…st.li into jleezer/dc-partition-support
Summary
This PR adds support for routing dark cluster traffic to partitioned hosts. For the most part the logic needed for this was present and working however the ClusterInfoProvider class was only using the Default Partition (0) to calculate the different host sizes. This has two problems, first the rate wont match what the user sets. And more importantly, if the cluster has no hosts that announce to 0, then the calculated QPS rate will be 0 and no traffic will be sent.
Testing
This issue was first reported with a cluster that did not announce to the default partition for both source and dark cluster. With the changes here, dark cluster traffic was routed to their dark host announced to partition 10.