0
votes

Let's say If I am using my own application load balancer instead of an Elastic Load balancer and I am using Nginx which is installed and configured in EC2 Instance.

Nginx is serving as a web-server and reverses proxy which has few upstream proxy servers at the backend. I can define cloud watch to check my backend servers load and set up the configuration to launch new instances when the server is in load but how to register that instance setting on Nginx?

What are the best practices for achieving auto-scaling in my case? How to offload it once the load is normalized

1
can you take a look at AWS systems manager? using aws ssm, you can run scripts on ec2 instance hosting nginx and in turn, update the nginx configurations to add new ec2 instance to group of instances that are being currently load balanced on.shyam
@shyam Thanks for the answer. Yes that's one way of doing it.Talha Nasim

1 Answers

0
votes

In this case, you need to create your own AutoScaling service and create your own API to talk with Nginx when a new server starts or when a server shutdown.

But this is not the preferred way to use your application on Cloud. AWS services offer solutions for this.