You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a basic configuration to support consul service discovery, we're seeing some inconsistent behaviour when using the queryPassing setting. An example configuration is shown below.
Service starts and registers with consul - endpoints not yet started.
Route is registered in gateway as expected.
Service health check goes to passing.
If multiple instances are started, the load balancer will occasionally choose one that is not passing healthchecks.
When queryPassing is true and the service is up before gateway, we observe:
Gateway starts, detects new service and registers route.
If multiple instances are running, load balancer will only choose ones with healthchecks passing.
When queryPassing is true and the service is started after gateway, we observe:
Service starts and registers with consul - endpoints not yet started.
Route is not registered with gateway because /actuator/health not yet up on the service.
Service health check goes to passing.
Service route returns 404.
Another service starts and registers with consul, same thing happens, but first service now has its route registered because healthcheck is passing.
My initial thoughts on this are that we should be doing one of the following:
Don't include queryPassing when establishing routes and only use it for the load balancer.
Add some logic to the Consul catalog scan so that it will refresh routes when a service that was failing goes to passing. I can't see a way of doing this without making significantly more requests to Consul.
The text was updated successfully, but these errors were encountered:
@spencergibb As explained above, the spring.cloud.consul.discovery.query-passing=true parameter works inconsistently. Is there currently any other way to exclude unhealthy services from gateway load balancing?
When using a basic configuration to support consul service discovery, we're seeing some inconsistent behaviour when using the queryPassing setting. An example configuration is shown below.
When queryPassing is false, we observe:
When queryPassing is true and the service is up before gateway, we observe:
When queryPassing is true and the service is started after gateway, we observe:
My initial thoughts on this are that we should be doing one of the following:
The text was updated successfully, but these errors were encountered: