IIS 7 and Above
Application Request Routing (ARR)
Routing Different Domains to Different Server Farms
Last post Apr 11, 2019 06:11 AM by Able
Apr 10, 2019 11:48 AM|ryankekos|LINK
Hi. Is it possible to route www.domain1.com to "serverfarm1" and
www.domain2.com to "serverfarm2" for example? I've been trying to use regular expressions to do this but it doesn't seem ARR likes the way I am doing it. I was trying to do this using:
Action: Route to Server Farm
Thanks so much for the help!
Apr 10, 2019 05:06 PM|Rovastar|LINK
Yes this is straight forward.
You will need 2 rules one for each farm.
What you are probably missing is that you need a condition to look at the HTTP_HOST and match that to ^www.domain1.com
And in the general pattern just have a normal (.*) (the general overall pattern is for the URL stem so it doesn't contain the domain.)
Hopefully you should get it from that if not post back.
Apr 10, 2019 08:38 PM|ryankekos|LINK
That seemed to work! Thank you. My next question would be from performance. Say I had 10,000 sites. Would it be easier for IIS/ARR to have 10,000 rules with one condition or one rule with 10,000 conditions? Wonder if anyone has tested that. In addition I'm
trying to setup a farm which allows only one website per online web server.
See this thread. Any thoughts?
Apr 11, 2019 06:11 AM|Able|LINK
According to your description,when you have multiply sites for the same server. We often use Shared Configuration.
As you said, assume that you have 1000 sites and they have 1000 rules and aim to one server , when the target server has changed, we have to change 1000 rules and it is obvious a big trouble. So we could use shared configuration, it will let multiply servers
share one configuration file and the same rule, so it will be more convenient to make a change for different situation.
Here is the link ,I hope it could help you.