borrimorri
borrimorri

Reputation: 117

How to prepare for load balacing?

I am a little confused on how to prepare an elastic load balancer. Suppose I have a web application written in node.js and a frontend written in react.js Would I have the node.js/react.js code duplicated on multiple EC2 instances? Then hook those instances up to the load balancer so it can be distributed? In that case, if a change were to be made, it would have to be updated on each of the servers, correct?

Upvotes: 0

Views: 45

Answers (2)

deadzg_devil
deadzg_devil

Reputation: 378

Elastic Beanstalk would be a perfect choice for your scenario where it handles the deployment of the code to the multiple numbers of EC2 instances.

Another workaround is to use an Autoscaling group, which will sit behind a load balancer.

Upvotes: 1

Mark B
Mark B

Reputation: 200476

Would I have the node.js/react.js code duplicated on multiple EC2 instances? Then hook those instances up to the load balancer so it can be distributed?

Yes, that's how load balancing works. It balances the load across multiple servers.

In that case, if a change were to be made, it would have to be updated on each of the servers, correct?

Correct

I suggest you look into using Elastic Beanstalk, which will handle most of this for you. You would push a change to Elastic Beanstalk and it will handle deploying that change to each of the load balanced servers.

Upvotes: 3

Related Questions