Consul client caching

Hi,

We have a core Consul server cluster, and a number of Consul clients at a different site than the Consul server cluster. So, there may be situations where the client site gets “offline” and has no access to any of the Consul servers. We have services running alongside the Consul client agents that rely on Consul for key/value configs. It appears that Consul client agent requires access to at least one Consul server to serve KV read requests, even in “stale” mode. Is there anyway we can configure Consul client to return key values, even when the Consul client is unable to talk to any Consul server? We are ok with eventual consistency, and reading a stale copy from the Consul client.

Hi @sudhindra,

Welcome to the HashiCorp Forums!

Please note that what you are looking for is not possible in Consul for KV operations. If you look at the documentation, you will see that none of the KV endpoints supports agent caching.

You can refer to the API docs to determine whether the agent cache is involved by looking at the table against each endpoint.

I hope this helps.

1 Like