Default stale reads in Consul HTTP API return potentially outdated service data
0 reputation · 13 Jun 2023, 03:33 UTC
Goal
Determine whether Consul provides a mechanism to enforce fresh reads globally across all HTTP API queries without requiring the stale=false parameter on every request.
Constraints and uncertainty
The HTTP API defaults to serving stale data from the cache unless stale=false is explicitly set per request. Documentation does not specify a default freshness guarantee, and there is no global configuration flag or middleware to disable stale reads cluster-wide. Operators must either accept potentially stale responses or modify every client integration to append the parameter, which is error-prone and inconsistent across teams.
Questions
- Is there an undocumented or version-specific configuration option that changes the default
stalebehavior for all HTTP endpoints? - If no global setting exists, what is the recommended pattern for enforcing fresh reads across heterogeneous clients without modifying each call site?
- Does the DNS interface exhibit the same default staleness, and can its TTL be overridden per service?