consul-template
consul-template copied to clipboard
Allow setting dedup prefix on cli
Allows for setting the dedup prefix on the command line. This can be nice if you want to set different prefixes at runtime without having to template the consul-template config file.
Hey @nosammai, thanks for the PR. Before reviewing this I have a question...
Have you tested and/or do you plan on switching to Consul's health streaming support? This is a beta/experimental feature in the Consul 1.9 series but will be on by default in 1.10. I'm hoping it will make dedup unnecessary and I'm hoping to remove it if this is the case.
Thanks.
I haven't tested it yet, but definitely plan on switching over to that when it's no longer experimental. If it resolves our performance issues, we would like to use that instead of dedup on consul-template.
Does the service
API function in consul-template use the Health API that has streaming enabled?
Does the
service
API function in consul-template use the Health API that has streaming enabled?
Yes, as long as the consul servers and the local consul agent all support the streaming protocol (all are 1.10+). Consul-template uses the local agent for queries and agent-server communications that support it [1] will get streaming automatically.
[1] this is just the health related service information for now
Marked this with "thinking" to note that it's waiting until after the 1.10 streaming is out to see how much it helps with the network performance overhead which people mitigate using dedup.
One important thing that the dedup functionality helps with is when we need to watch 1000+ services and we do not want to do that on every instance of consul-template. Would streaming help with that as well?
@nosammai were you ever able to test this out? and how did it go?
Is this still usable or can this PR be close now?
Yep the streaming functionality fixed the issues we were having that required us to use dedupe.
@nosammai great, thank you for getting back to me. Will be closing this PR now as not needed anymore since the streaming functionality helped fix the issues you were having that required the use of dedup