Monday, May 14, 2012

Create multiple Server Farms in one IIS ARR (Application Request Routing)

Most people use ARR to increase web applications' scalability and reliability by leveraging rule-based routing, load balancing, shared hosting and disk caching, etc. In my case, I found it a very good solution for medium sized corporations to expose their data via RESTful, OData or SOAP based web services if they already have the infrastructure in place and do not intend to go Cloud at the moment.

In our business scenario, there are a few implicit requirements:
  1. We should be able to use existing infrastructure without adding new hardware/servers.
  2. We should be able to expose all services using only one endpoint, which is the gateway. Furthermore, we expose the services as standard HTTP port 80 while the actual ports for our internal services are not disclosed.
  3. We must have the least number of holes in firewall for all services, ideally the number would be one.
  4. We should have a consistent and clean URL pattern for all services. For example: and, etc.
  5. We may also use this gateway to expose other resources than web services, e.g. reports.
  6. The server farms can support different authentications, e.g. reports farm does not allow anonymous access.
  7. The solution must be reliable and easy to maintain though load balancing and redundancy are not big concerns at present.
A simple practical design is like this:

For big enterprises, multiple ARRs can be utilised for routing specific types of requests to different server farms, for example one ARR for reporting server farm and one for general web services, etc. But what I am sharing here is how to use one ARR to dispatch requests to multiple server farms based on rule-based routing.

So first we create two server farms, add servers (and port mappings if any) in each farm:
Then we add the URL Rewrite rules

For the Reports Farm, we would like the original URL http://internal.server.ip:port/Reports/Pages/Report.aspx?ItemPath=SomePath to be routed to the servers in the reports farm with the exposed URL being http://external.server.ip/Reports/Pages/Report.aspx?ItemPath=SomePath, so the rule is like:

For the Services Farm, we would like the original URL, e.g. http://internal.server.ip:port/Services/Service1/Odata.svc/Products(5) to be routed to the servers in the services farm with the exposed URL being http://external.server.ip/Service1/Odata.svc/Products(5), so the rule is like:

And there we go. We can then configure the load balance and caching stuff as usual. It's awesome that ARR provides such great flexibility and capability in IIS.

  1. ARR
  2. Using the URL Rewrite Module


Sequencing Server said...

Thanks. I've followed through to setting the 'Action', but I don't get an option for 'Route to Server Farm' even though I have 2 server farms configured.. I have options for rewrite, none, redirect, custom response and abort request.. Any ideas? Is this specific to Svr 2012/2012R2? Could it be because I'm using Svr 2008 R2?

Suseela Susiee said...

What an awesome post, I just read it from start to end. Learned something new after a long time.

datawarehousing training in Chennai

Abiya Carol said...

This blog is having the general information. Got a creative work and this is very different one.We have to develop our creativity mind.This blog helps for this. Thank you for this blog. This is very interesting and useful.

digital marketing course in chennai

Anonymous said...

I read your blog you have applied some information only in this blog, please give some more information too. It will be helpful for me.

Best Dental Clinic In Vellore

Sowmiya said...

This blog is very much nice and very useful too, it makes me to improve my knowledge, so please latest kind of information.

Web Design Company in Chennai

deeksha said...

This blog is very well good, so it is very much impressive and it will be useful too to understand many more things.

Digital Marketing Company in Chennai

deeksha said...

I read your articles very excellent and the i agree our all points because all is very good information provided this through in the post.

Digital Marketing Company in Chennai

Deepika said...

I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon.

Best Dental Clinic in Chennai | Best Dentists in Chennai | Dental Hospital in chennai

Sowmiya said...

I read your articles very excellent and the i agree our all points because all is very good information provided this through in the post.

Digital Marketing Company in Chennai

Sanjana sekar said...

Wonderful blog.. Thanks for sharing informative blog.. its very useful to me.. iOS App Development Company in Chennai

Abiya Carol said...

It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command.

Dotnet Training in Chennai

Mahalyasree said...

Great articles, first of all Thanks for writing such lovely Post! Earlier I thought that posts are the only most important thing on any blog. But here at Shoutmeloud I found how important other elements are for your blog.Keep update more posts..
Office Interiors in Chennai
Home Interior Decorators in Chennai

rp ap said...

Nice...Excellent article and useful to others

Skilful Training Classes and Boot Camps

Ancy merina said...

Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site
BEST web designers in bangalore
ECommerce Website developers in bangalore

Nicole Bolton said...

It’s the best time to make some plans for the future and it is time to be happy. I’ve read this post and if I could I want to suggest you few interesting things or suggestions.You can write next articles referring to this article. I desire to read even more things about it..
Fleet Management Software
Human Resources Management Software
Logistics Software
Manufacturing ERP

Atom Steels said... is an online platform that allows people to find offers and the greatest deals in and around OMR. It is the directory of the business in and around omr. It helps internet users to surf the required deals and offers.

Offers in Chennai

Arushi Chaya said...

Benefits of reading your post. This will help in the maintenance of our health.The daily routine will help you lose weight quickly and safely.My life is totally transformed after I followed this diet.I feeling great about myself.

Herbalife in Chennai
Nutritionclub in Chennai
Weight Loss in Chennai
Weight Gain in Chennai

Unknown said...

All the latest updates from the Python Automationminds team. Python Automationminds lets you program in Python, in your browser. No need to install any software, just start coding straight away. There's a fully-functional web-based console and a programmer's text-editor
Phyton training in Chennai

simbu said...

I have picked cheery a lot of useful clothes outdated of this amazing blog. I’d love to return greater than and over again. Thanks! 
Java training in Chennai | Java training institute in Chennai | Java course in Chennai

Java training in Bangalore | Java training institute in Bangalore | Java course in Bangalore

Java online training | Java Certification Online course-Gangboard

Java training in Pune

ram said...

I would really like to read some personal experiences like the way, you've explained through the above article. I'm glad for your achievements and would probably like to see much more in the near future. Thanks for share.
Data Science training in Chennai | Data Science Training Institute in Chennai
Data science training in Bangalore | Data Science Training institute in Bangalore
Data science training in pune | Data Science training institute in Pune
Data science online training | online Data Science certification Training-Gangboard
Data Science Interview questions and answers

ais a said...

Thank you for allowing me to read it, welcome to the next in a recent article. And thanks for sharing the nice article, keep posting or updating news article.
Best Devops training in sholinganallur
Devops training in velachery
Devops training in annanagar
Devops training in tambaram

Revathy said...

Excellant post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.

angularjs-Training in pune

angularjs Training in bangalore

angularjs Training in bangalore

angularjs Training in chennai

automation anywhere online Training

angularjs interview questions and answers

simbu said...

I have been meaning to write something like this on my website and you have given me an idea. Cheers.
Java training in Chennai

Java training in Bangalore

kevin antony said...

This is a nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
best rpa training in bangalore
rpa training in bangalore | rpa course in bangalore
RPA training in bangalore
rpa training in chennai
rpa online training

sasitamil said...

After reading this web site I am very satisfied simply because this site is providing comprehensive knowledge for you to audience.
Thank you to the perform as well as discuss anything incredibly important in my opinion. We loose time waiting for your next article writing in addition to I beg one to get back to pay a visit to our website in

Selenium training in bangalore
Selenium training in Chennai
Selenium training in Bangalore
Selenium training in Pune
Selenium Online training

sai said...

I and my friends were going through the nice, helpful tips from the blog then the sudden came up with an awful suspicion I never expressed respect to the website owner for those secrets.
python Course in Pune
python Course institute in Chennai
python Training institute in Bangalore

Sadhana Rathore said...

I am very happy to visit your blog. This is definitely helpful to me, eagerly waiting for more updates.
Machine Learning course in Chennai
Machine Learning Training in Chennai
Data Science Course in Chennai
Data Science Training in Chennai
DevOps certification in Chennai
DevOps Training in Chennai
Machine Learning Training in Velachery
Machine Learning Training in Tambaram

tamilsasi said...

This is quite educational arrange. It has famous breeding about what I rarity to vouch.
Colossal proverb. This trumpet is a famous tone to nab to troths. Congratulations on a career well achieved.
This arrange is synchronous s informative impolite festivity to pity. I appreciated what you ok extremely here.

Selenium training in bangalore
Selenium training in Chennai
Selenium training in Bangalore
Selenium training in Pune
Selenium Online training
Selenium interview questions and answers