Skip to content
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

What hashing strategy does Contour use in load balancing? #6351

Closed
jroper opened this issue Apr 17, 2024 · 1 comment
Closed

What hashing strategy does Contour use in load balancing? #6351

jroper opened this issue Apr 17, 2024 · 1 comment
Labels
kind/question Categorizes an issue as a user question.

Comments

@jroper
Copy link

jroper commented Apr 17, 2024

What question do you have?:

The documentation for load balancing mentions a RequestHash strategy. It then links to the Envoy documentation for more information about load balancing strategies. The problem is, that's not the name of an Envoy load balancing strategy. Envoy has two different request hashing load balancing strategies, which are drop in replacements for each other, Maglev and Ring hash. The contour docs don't say which is used, or how to select one if indeed you can select one or the other.

I think, at a bare minimum, if the Contour docs are going to delegate to the Envoy docs to understand load balancing strategies, the Contour docs should say which load balancing strategy in Envoy that RequestHash maps to. But, I think there should also be a mechanism in Contour to select which one gets used.

@jroper jroper added kind/question Categorizes an issue as a user question. lifecycle/needs-triage Indicates that an issue needs to be triaged by a project contributor. labels Apr 17, 2024
@skriss
Copy link
Member

skriss commented Apr 22, 2024

Hey @jroper, Contour uses ring hash, ref.

case dag.LoadBalancerPolicyCookie, dag.LoadBalancerPolicyRequestHash:
return envoy_config_cluster_v3.Cluster_RING_HASH
.

Fair point on the docs, it would be good to clarify which strategy is being used in addition to linking to the Envoy docs for more background information. Would you care to contribute a fix?

Re: selecting between ring hash and maglev, that could certainly be considered as a feature. If you open a feature request issue specifically for that item, that will give folks a chance to comment. And again, if you are interested in contributing with design/implementation, that would likely be the fastest path towards moving this forward.

@skriss skriss removed the lifecycle/needs-triage Indicates that an issue needs to be triaged by a project contributor. label Apr 22, 2024
@skriss skriss closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Categorizes an issue as a user question.
Projects
None yet
Development

No branches or pull requests

2 participants