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
Hello, I'm working on Consul and have seen several users face issues around how spring-cloud-consul interfaces with Consul so I've been trying to investigate.
I've noticed that spring-cloud-consul-discovery polls the Consul catalog very frequently with short-lived blocking queries (specifically the call to /v1/catalog/services?wait=2s&index=<index> at default 1s intervals).
The intention for blocking queries is that you wait on one connection which will hold until any catalog changes are detected by the agent. It is meant to be an efficient alternative to frequent polling.
It should be enough to make one call to /v1/catalog/services?index=<index> without the default deadline of wait=2s. In fact, removing the ?wait= would drastically reduce the network traffic to Consul clients with no impact to service discovery.
The text was updated successfully, but these errors were encountered:
Hello, I'm working on Consul and have seen several users face issues around how spring-cloud-consul interfaces with Consul so I've been trying to investigate.
I've noticed that spring-cloud-consul-discovery polls the Consul catalog very frequently with short-lived blocking queries (specifically the call to
/v1/catalog/services?wait=2s&index=<index>
at default 1s intervals).The intention for blocking queries is that you wait on one connection which will hold until any catalog changes are detected by the agent. It is meant to be an efficient alternative to frequent polling.
It should be enough to make one call to
/v1/catalog/services?index=<index>
without the default deadline ofwait=2s
. In fact, removing the?wait=
would drastically reduce the network traffic to Consul clients with no impact to service discovery.The text was updated successfully, but these errors were encountered: