IIS 7 and Above
Webapp behind ARR load balancer - how to setup IIS bindings on the we...
Last post Feb 07, 2019 08:16 AM by Dvijne
Feb 06, 2019 11:33 AM|Dvijne|LINK
I'm working on a load balance implementation for a custom .NET web application.
I'm using IIS ARR load balancer. I've read a lot of articles about it but one question left unanswered so far.
So I have 1 ARR server (there will be 2) which has a DNS record: loadbalance.company.org.
I have 2 webservers with IIS hostnames web1.company.org and web2.company.org.
My problem is that it's only working when I delete the hostname from the nodes in IIS bindings. It happens because I route the
request without rewriting the hostname to web1.company.org or web2.company.org.
As far as I know there are 4 scenarios to handle this situation:
1. Delete the hostnames from IIS bindings as described above.
pros: Simple setup.
cons: Cannot use same port and protocol for other sites.
2. Add an additional hostname to IIS bindings (loadbalance.company.org) on both nodes so they will listen only to the loadbalancer and webx hostnames.
pros: Simple setup.
cons: I don't see any.
3. Use URL rewrite on the nodes. In this case when ARR routes the request I can use URL rewrite on the nodes to
modify the hostname from loadbalance.company.org to webx.company.org
pros: It can handle multiple sites easily.
cons: More advanced setup. Additional resource usage(?)
4. Install the webapplications with the same URL as the loadbalancer.
pros: Simple setup
cons: Name Resolution could be problematic (from a webapp servers perspective who will be the loadbalance.company.org?)
It seems that option 2 is the best possible option. What do you think? Is there any other solution?
Thank you and kind regards,
Feb 07, 2019 03:12 AM|Jalpa Panchal|LINK
You could select any option from above scenario which properly fit in your requirement and you could familiar with,but generally people use Url Rewrite approach which is more convenient. it is more recommended and widely accepted feature.
Feb 07, 2019 06:43 AM|Dvijne|LINK
Thanks for the answer. I will try the URL rewrite. Could you please tell me if it's possible to do it on the ARR or must be done on the nodes? I'm asking because the ARR only knows who gets the request when the algorithm decided it, so after that I cannot
use a rewrite rule to modify the hostname from loadbalance to web1 or web2. Or is there a way to do it?
Feb 07, 2019 06:57 AM|Jalpa Panchal|LINK
Or is there a way to do it?
Feb 07, 2019 08:16 AM|Dvijne|LINK