I am planning to host 3 URLs on one Ec2 instance(linux and not container based) and do path based routing. Can you please help to find out whether ALB supports multiple URLs within the same instance.
Note: I understand its possible to route to containers within a single instance but my requirement is not containers
Whether AWS ALB can route to different URLs within the same instance (not container based)
amazon-albamazon-elbamazon-web-servicesload balancing
Related Topic
- Docker – Amazon ECS (Docker): binding container to specific IP address
- Does AWS offer a way to route HTTPS traffic to two different EC2 instances based on directory path
- Allow internet access for ec2 instances with private IP addresses inside a public subnet
- AWS Fargate – Is Fargate Suitable for Low Resource Utilization Containers?
Best Answer
Containers aren't actually visible to ALB -- even if you are using them, what matters is the TCP port the HTTP server is listening on. If your services each listen on a specific port (which they would necessarily need to do, otherwise they wouldn't be different services), then yes, ALB can route requests to multiple services on the same instance, based on the path.
Each service would be associated with a unique target group on the ALB, registered using the port where it listens for requests from the balancer.