-
Notifications
You must be signed in to change notification settings - Fork 2k
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
configuration for Envoy load balancing policy #9997
Comments
The |
I tried to find any examples without success. From my understanding I have to use an "escape hatches" to achieve this, so something like that:
It doesn't work for me yet, seems like I have to define a full envoy cluster configuration here but all I want to change is a lb_policy. Could you give an example or hint here? Am I on right path at least? |
Ah, sorry you're right. I'd forgotten we have that
So unfortunately it looks like you need to pass it the whole darn JSON config as described in the Envoy docs. You might be able to extract the full config from a running Envoy sidecar (via This seems like the sort of thing that lots of folks will want to configure. It might be a good idea to open an issue in Consul to see if this policy could be added to the proxy config, and then you could just pass it in the Nomad |
Created a Consul issue, I hope I made sense in it. |
Hi @Oloremo, Consul 1.9 added support for configuring Envoy's lb_policy using the LoadBalancer parameter on a service resolver. You just need to create a service resolver configuration entry for your service in Consul in order for it to be used when deploying your application in Nomad. # backend-service-resolver.hcl
Kind = "service-resolver"
Name = "backend"
LoadBalancer = {
Policy = "random"
} Then write that configuration to Consul using consul config write backend-service-resolver.hcl The proxies within the service mesh will use the specified load balancer policy when connecting to the A step-by-step tutorial for configuring various load balancer policies can be found at https://learn.hashicorp.com/tutorials/consul/load-balancing-envoy. |
This kinda reminds me of #8647 (comment) -- I think it would be great to set those things as part of a nomad job and let nomad figure out the rest instead of having to manually create those entries in consul. FWIW this might be less of an issue if the |
Ok, looks like we have a workaround for this, but also it would be nice to have a more "Nomad native" configuration setup. Going to mark this as a feature request and move it to the roadmap for further discussion. |
Seems like it's possible in Consul Connect via service-resolver
How can I configure it for Nomad jobs with Consul Connect?
In our tests we receive very uneven connection results using the default Round Robin policy:
The text was updated successfully, but these errors were encountered: