hashicorp / consul

Consul is a distributed, highly available, and data center aware solution to connect and configure applications across dynamic, distributed infrastructure.
https://www.consul.io
Other
28.31k stars 4.42k forks source link

AWS/cloud awareness for consul agent #7379

Open kshcherban opened 4 years ago

kshcherban commented 4 years ago

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.

blake commented 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?