Why does Consul support tags at all?

203 views
Skip to first unread message

edw...@csdisco.com

unread,
May 18, 2016, 12:20:18 AM5/18/16
to Consul
I was immediately taken aback the moment I realized that after defining multiple tags for my nodes, that consul doesn't support filtering based on multiple tags.

I'm completely confounded, why are multiple tags even supported in the first place? How are people getting around this?

My example is I'm registering 'elasticsearch' as a service, and may have multiple clusters, some with master \ data \ client nodes, and some with HTTP access disabled.

If I register them all under 'elasticsearch', I can then just tag them appropriately, and if I was able to filter by multiple tags, always get back exactly which IPs I need.

Without that filtering though, what am I supposed to do? Am I supposed to register a bunch of different service names? because that would be extremely painful.

Thanks

Chris Miller

unread,
May 18, 2016, 3:27:30 AM5/18/16
to Consul
Personally I've created a wrapper API that performs additional filtering on the client side for tags beyond the first one. There's obviously a bit of extra overhead with network traffic but our service queries are infrequent it doesn't matter at all. If/when Consul adds support for filtering on multiple tags, I can just change the wrapper implementation without affecting the rest of the codebase.

Michael Fischer

unread,
May 18, 2016, 5:48:48 AM5/18/16
to consu...@googlegroups.com
Have you tried the prepared-query functionality?  https://www.consul.io/docs/agent/http/query.html


--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/consul/issues
IRC: #consul on Freenode
---
You received this message because you are subscribed to the Google Groups "Consul" group.
To unsubscribe from this group and stop receiving emails from it, send an email to consul-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/consul-tool/69186cdd-e5a1-4ff7-abd5-431d145e2585%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ethan Edwards

unread,
May 18, 2016, 11:08:41 AM5/18/16
to consu...@googlegroups.com

I'm aware of prepared queries, but I need disposable CRUD automation for them, and neither Terraform or the consul chef cookbook support them.


You received this message because you are subscribed to a topic in the Google Groups "Consul" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/consul-tool/4K_b9s21Shc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to consul-tool...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/consul-tool/CABHxtY4P4Bo5RSNkRgT1Ww7iF8bGs5czEgj0gCJEQnDjhkoHJQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.
--
Ethan Edwards | Engineer, Development Operations

DISCO

4400 Post Oak Parkway, Suite 2700, Houston, Texas 77027
Reply all
Reply to author
Forward
0 new messages