-
Notifications
You must be signed in to change notification settings - Fork 689
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
Support list of loadBalancerPolicy for HTTPProxy #3044
Comments
Assign to Nick to review. |
Thanks for logging this issue @wildermesser. I think there are a few questions in here, I'll do my best to answer as I can. For your example, it looks like the more complex functionality you want to use allows specifying what the hash that goes into the cookie will look like - in this case, based on the user-agent and source IP. I can see how that would be useful, I hadn't taken the time to fully parse how this hash_policy works before - I thought you could only have one at a time. It does seem like it would be useful to be able to do things like this, and I can see we also have #2965 which describes a similar request. I have absolutely no idea what the way to configure this would look like though, this would almost certainly need a full design document, to figure out how to fit it into HTTPProxy. We're also constrained by the fact that HTTPProxy is a GA API, so we can't change the meaning of existing fields in incompatible ways. You've also asked some other things about how to change Envoy's config - there are a couple of relevant points here:
I hope this answers some of your questions and look forward to hearing more from you. |
xref #2856 |
Thanks for answering my questions!
|
If we can, @wildermesser, I'd really like to understand your use case, so we can make it so you don't need to carry a fork (at least for too long). Are there specific things you're looking to achieve with the greater configuration flexibility? |
No, nothing more than I specified on the topic message. I think that it is rational to implement all hash_policy options from evnoy because:
|
I think that there's some work here to understand a number of requests, this one #2856, and #2965, which all interact with fine-tuning load balancing. We may need to add a new field that exposes the complexity, but this one will need a design document. The core maintainers don't have this one prioritised yet, but I think we'll try and get it on the roadmap. |
Glad to hear it! I will be happy to review this design document if you consider it is useful. |
Updates: projectcontour#3099 Updates: projectcontour#3044 Signed-off-by: Sunjay Bhatia <[email protected]>
Relevant design: #3268 |
Adds APIs for extending to other forms of request attribute load balancing in the future Updates: projectcontour#3044 Fixes: projectcontour#3099 Signed-off-by: Sunjay Bhatia <[email protected]>
See #3282 if you would like to review the changes going in to start supporting this |
we do support a list of request hash policies but so far have only implemented header based hashing it is possible to add other types, including cookie based (envoy generated) and source ip, see https://github.com/projectcontour/contour/blob/main/design/loadbalancer-hash-policy-design.md#changes-to-loadbalancerpolicy for an example of how we could add a new field we could deprecate the existing cookie load balancing functionality to migrate to supporting only the request hash strategy instead and move the cookie generation (and add passive cookie hashing) there so it can be used in conjunction with header hashing |
Yes, that sounds good. I think that we should investigate how we can add more of the hash policy flexibility from Envoy into the new hash policy list. |
heres a start of an API: #3993 any feedback appreciated |
we do support a list of different request attribute hash policies, you can hash a request on multiple attributes of a request. we can open subsequent issues for new attributes to hash on that users want |
Currently, I can use only one policy from:
But envoy supports a list of parameters for hash_policy. And the cookie is only one of them. With cookie
loadBalancerPolicy
, I have this envoy's config:When a request does not contain this cookie, it will be routed to a random backend server. But I want to set additional rules like:
It would be cool when Contour can support this rich load balancing functionality.
I understand that my case may be very specific. What is the simplest way to change runtime envoy configuration which will not changes when changing pod's list?
Should I use something like https://github.com/fullstorydev/grpcurl for changing the configuration of envoy instance on the fly? Or contour has some kind of configuration template?
The text was updated successfully, but these errors were encountered: