-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consul KV api enhancements #4142
Comments
@vaLski That's actually a good idea, but instead of adding For the I am not a big fan of the name however, I'll try to find something more descriptive, for instance: |
@pierresouchay Correct. The |
Is this implemented yet? Please suggest if this can be done ? |
@CJLove don't think so, on my side, I am doing this with watch on a full tree. It works well enough even with many writes /sec on large clusters. The only real issue is whether you have having many many large clusters with large values written very often, but for most usages, watching the whole KV works well enough Here is how we do this in Consul-Jim's template of consul-templaterb: https://github.com/criteo/consul-templaterb/blob/master/samples/consul-ui/consul_keys.json.erb On our side it works very well with thousands of keys on very large clusterd (but reasonable sizes and not that many writes/s) |
Feature Description
Extend the Consul KV rest api with additional blocking query options:
The meta=true option would result in returning keys and metadata but no values
The filter=true would only include keys whose modify indices were > X
The filter=true option would only return key/value/metadata for keys whose modify indices were > X
Use Case(s)
There are two use cases of interest:
Support clients doing blocking query of a key prefix in order to detect keys being added/removed. Currently the blocking query returns the complete set of keys, so the client needs to maintain state and do set difference operations in order to detect added/removed keys.
Support clients doing blocking query of a key prefix in order to detect values being modified. Right now this has to be done via a blocking query returning values for all keys.
As suggested in this thread (https://groups.google.com/forum/#!msg/consul-tool/Axow65BtSuY/TCLD5AFmCgAJ;context-place=forum/consul-tool) it would be great if there was an option for Consul to filter and return just the keys with a X-Consul-Index > the index specified in the query
The text was updated successfully, but these errors were encountered: