Skip to content

Conversation

@jcleezer
Copy link
Contributor

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.

}

@Override
public int getClusterCountAcrossPartitions(String clusterName, String scheme) throws ServiceUnavailableException
Copy link
Contributor

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.

@shivamgupta1 shivamgupta1 merged commit c46eebd into linkedin:master Sep 30, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants