1

I have an ECS cluster with 3 services(FARGATE), the 3 services are in private subnets. 1 is the web app that is publicly accessible through an Internet-facing Load Balancer and the 2 others are only accessed from the web app. For internal communication, I'm using Service Discovery names. enter image description here

Everything is working but now I'm debating if I need an internal Load Balancer just between the web app and the 2 internal services in case they scale out/in. So, if one of my internal services scales out and I'm using the Service Discovery name for internal communication, it is enough? Or, do I need an internal Load Balancer that can route the traffics to the different service instances?

Does this make sense?
enter image description here

Castro Roy
  • 265
  • 1
  • 7
  • 17

1 Answers1

5

Service Discovery is enough. New nodes will be added to the SD name resolution when they are started. Unfortunately many people don't know / use Service Discovery and resort to the more expensive ALB. Good on you for using SD :)

MLu
  • 23,798
  • 5
  • 54
  • 81
  • thanks for the answer, so what exactly happen when my downstream private service scaleup? The SD will take care of load balancing it? – Madeo Mar 05 '21 at 11:15
  • 1
    I don't think you'll see the right behavior. DNS queries typically will be cached on the application, and it will work, but if your application scales quickly, you'll need to wait for the DNS TTL for nodes to become aware of the newly available addresses in the registry. ALB I think is faster to respond to scale out and scale in. – schwerwolf May 11 '21 at 19:59