Open kshcherban opened 4 years ago
Hi @kshcherban,
I'd like to understand more about your use cases for this functionality. Would you mind sharing a bit more info on how you would like to consume such a feature if it existed in Consul?
Would you want service discovery to automatically return a list of filtered endpoints, or only do so if the client requests the filtering (such as using a HTTP query param)? Would you want this to work with standard <x>.service.consul
DNS lookups, prepared queries, or both?
Are you also interested in having this available in the service mesh as described in hashicorp/consul#7401?
Feature Description
Consul already has some features that are specific to clouds, like integration with AWS Service Mesh or discovery based on EC2 tags. It would be nice to have some AWS information automatically embedded in agent's node-meta for service filtering.
This can be configured as agent flag and turned off by default. Any cloud providers can be used, AWS is just an example.
Use Case(s)
One of the use-cases. If availability zone is set, service A that talks to service B can query IPs of service B in availability zone where it runs first and then use others as fall-back. That may save costs for cross-zone traffic.
Additional use-case would be to set all available instance tags for the same filtering. Like you have instances in multiple accounts connected to the same consul cluster and having different account name in meta for example.