Automating Reverse Proxy Configuration with Auto-scaling on AWS


Hello AWS Community,

I am currently working on an application hosted on AWS that requires the use of reverse proxies for routing traffic to my backend services. My setup involves multiple modules, with one acting as the front-facing reverse proxy and the others providing various backend functionalities. I want the front-facing module to handle all incoming requests and route them internally to the appropriate backend modules.

Given the dynamic nature of my application, instances in the backend modules will frequently scale up and down based on demand. My challenge is ensuring that the reverse proxy can automatically discover and route to these instances without manual intervention, especially considering that the IP addresses of these instances will change as they are added or removed.

I am looking for a solution that allows me to:

Automate the discovery of backend instances by the reverse proxy, so it always routes traffic correctly, regardless of the instances being scaled up or down. Integrate this setup with AWS Auto Scaling Groups (ASG) to manage instance scaling. Use AWS services (preferably without resorting to third-party tools) to maintain this setup with high availability and security. Does anyone have experience setting up a similar architecture or could provide insights into the best AWS services and configurations to achieve this? Any advice on using Elastic Load Balancing (ELB), Amazon Route 53, and AWS Auto Scaling together for this purpose would be greatly appreciated.

Thank you in advance for your help!



If you are using EC2, I think it would be a good idea to create an environment that uses AutoScaling and ALB to perform load balancing.
The configuration is as described in the document below, which is created on the front end and back end.
By linking the ALB target group to AutoScaling, it will be automatically linked to the ALB when scaling out.
Also, by integrating access to ALB, there is no need to be aware of EC2's IP address.

Although it is simplified, the configuration diagram is shown below.

If you can containerize your application and use ECS, you may consider using Service Connect.

profile picture
回答済み 2ヶ月前
profile picture
レビュー済み 2ヶ月前

ログインしていません。 ログイン 回答を投稿する。