简体   繁体   中英

Should I use a single AWS Load Balancer in a distributed environment?

I have a distributed environment with systems and microservices, they integrate using Apis Rest. I have the objective of reaching high availability and a strategy that I am trying to achieve is to have instances with a Load Balancer in front of them. Do I need to have an AWS Load Balancer for each set of instances of a system or is it enough to have just one to serve them all? For example, I have 2 instances of application A and 2 instances of application B. I can have an AWS Load Balancer for 4 instances or I would need to have a load balancer for application A and another for application B. If both possible alternatives, what are the advantages and disadvantages of each?

You can have only one Elastic Load Balancer for your requirements.

Your final architecture will be something like this:

两个应用程序的架构

Advantages:

  • You will have less costs (Because each alb hour have a cost)
  • You can scale your applications separated without problems with the target groups and scale politic definitions
  • It's more elegant

Disadvantages:

  • You have a path for each application (but I don't think that it's a problem for you)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM