containerpilot icon indicating copy to clipboard operation
containerpilot copied to clipboard

Use blocking queries to Consul instead of polling for watches

Open tgross opened this issue 8 years ago • 0 comments

From the Consul docs on blocking queries:

Many endpoints in Consul support a feature known as "blocking queries". A blocking query is used to wait for a potential change using long polling. Not all endpoints support blocking, but each endpoint uniquely documents its support for blocking queries in the documentation.

By having our watches use blocking queries on the Consul Health API, we can reduce the workload we put on the Consul agent and end up with faster response times to change.

With respect to backwards compatibility, the implementation can probably choose to ignore the existing interval field and provide a deprecation warning in the logs.

tgross avatar Aug 03 '17 13:08 tgross