Whether AWS ALB can route to different URLs within the same instance (not container based)

amazon-albamazon-elbamazon-web-servicesload balancing

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

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.