Scenario 1 (working): Here the scenario that works fine: I have 2 publicly accessible stateless services Foo and Bar
- Foo: 2 instances, listening on port
8081
- Bar: 1 instance, listening on port
8082
Sending requests to either http://clusteruri:8081
or http://clusteruri:8082
works fine and I see that for Foo the requests are nicely distributed between the two nodes where the two instances are hosted.
Scenario 2 (NOT working): Here the scenario I would like to enable: again 2 stateless services Foo and Bar
- Foo: 2 instances, listening on URI prefix
http://+:8080/foo
- Bar: 1 instance, listening on URI prefix
http://+:8080/bar
Please note that both services listen on the same port, but different paths (achieved by using a host that is built on top of http.sys, like WebListener).
Here things start to get odd: It seems ASF/load balancer don't really understand it and think that all 3 nodes just listen on port 8080 resulting in some requests to Foo ending up on the node hosting Bar and the other way round.
It seems that ASF/load balancer are able to automatically handle scenarios where services listen on dedicated ports, but doesn't really support services listening on the same port (but different path).
My questions
- Is there a way to get Scenario 2 working "out of the box" like it works for Scenario 1 (i.e. without implementing a custom app gateway service that does the routing)?
- Can someone please shed some light on how ASF configures/communicates to get Scenario 1 working? I.e. where can I "see" that ASF configured the load balancer that requests to Foo should go to either Node0 or Node1 and requests to Bar should go to Node2 depending on what port the request is sent to?