0
votes

I'm using haproxy service for loadbalancing tomcat applications. Since we moved in AWS I want to use one Load Balancing service (Netwrok Load Balancer) instead of haproxy-ec2 instance. Everything works except for two tomcat microservices which listen both on port 8080. In haproxy it was simple setting path_bag (like below) but in ELB I'm not able to find a solution to add both services with port 8080 under the same ELB.

frontend app *:8080
  acl tool_tomcat path_beg  /tool
  use_backend tool_app_backend if tool_tomcat
  acl approval_tomcat path_beg  /approval
  use_backend apr_app_backend if approval_tomcat
1

1 Answers

3
votes

Network Load Balancer operates on layer 4 and is not aware of that. What you want to use is the Application Load Balancer that operates on Layer 7 and does have have path based routing on it's listeners.