1

I have recently inherited a micro-services architecture deployed on AWS ECS using Application Load Balancers and Route-53 to handle service discovery and decided that consul would be simpler and cheaper for this task.

Our port mappings for services are dynamic and handled by ECS so A records won't work for DNS as they are missing the port.

What is the typical approach for using SRV records for DNS within services?

To build on that is consul the right tool for this job or is this a sign of some other underlying architectural issue as it seems that SRV records are not a standard use-case.

BHUVANESH MOHANKUMAR
  • 2,747
  • 1
  • 33
  • 33
Natelxon
  • 11
  • 3

1 Answers1

1

SRV records are useful for applications or scripts that can query them (e.g. client-side load balancing).

You can use Consul for your microservices setup together with a Consul aware load balancer such as https://traefik.io/ or https://github.com/fabiolb/fabio. - put an AWS load balancer in front of multiple instances of fabio/traefik/... and route all traffic to it.

Gal Ben-Haim
  • 17,433
  • 22
  • 78
  • 131
  • In this case I believe you need a TCP/UDP reverse proxy , which would rule out Traefik which will just handle HTTP traffic. – MikeW Dec 19 '17 at 03:27
  • I have it as an example, you can use fabio, or haproxy/nginx with dynamically compiled config files from consul (https://github.com/hashicorp/consul-template) – Gal Ben-Haim Dec 20 '17 at 10:04