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!

1개 답변
수락된 답변


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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인