Amazon ECS service access and load balancing in microservice architecture

12/8/2019

Can someone explain the load balancing mechanism in AWS ECS for me? I clearly understand how inter service communication is handled within a kubernetes cluster, there is an automatic load balancer applied when accessing a defined internal service. This means Container/Pod scalability is simply predefined:

when a Pod-1A from within the service-A is accessing another Pod-1B from within a different Service-B (Service to Service communication) this call is automatically load balanced to this Pod-1B from service-B.

So with service Registry in kubernetes we simply need to define Services and communication is automatically load balanced to the available Pods within the services.

So assuming that Pods are equal to Tasks and Services are equal to Services in AWS ECS, how is this load balancing mechanism handled wihtin ECS? Do we really need to apply an Elastic Load balancer at the task/pod level manually compared to kubernetes? (So that we need to define manually a load balancer for every service, to make this service and its tasks with its container scalable?)

Edit:

What is the reason in AWS ECS, to define a service which instantiates multiple replicas of a Task, when no load balancer has been defined? Will the traffic be routed only to the same Task replica (Container) all the time? (No scaling at all?)

Please note, this is not about access from external ip addresses, where an ingress controller is needed. I am talking about microservices where each service exposes its own http api to communicate with other services within the cluster (internal microservice Application), typically there is an API Gateway handling external traffic (ingress controller).

-- Jwf
amazon-ecs
communication
kubernetes
load-balancing
microservices

0 Answers