Skip to content
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: query by arbitrary number of tags #1317

Open
elecnix opened this issue May 16, 2017 · 0 comments
Open

Consul: query by arbitrary number of tags #1317

elecnix opened this issue May 16, 2017 · 0 comments

Comments

@elecnix
Copy link
Contributor

elecnix commented May 16, 2017

The consul namer currently allows specifying one tag to filter services, through the includeTag configuration key. That tag appears in the name like this:

/#/<prefix>/<datacenter>/<tag>/<serviceName>

The consul API supports searching with more than one tag.

That could be expressed by moving the tag to the tail of the path, interpreting as tags any residual fragments after the service name:

/#/<prefix>/<datacenter>/<serviceName>/<tag1>/<tag2>

One use-case is for resolving a service to a "preferred" service set, but also by service version. Two tag sets would be used; for example: primary and secondary, v1 & v2. That allows routing a v2 request preferably to a primary but only if it supports v2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants