IIS 7 and Above
Application Request Routing (ARR)
ARR Loadbalancing - Route based on query string value
Last post Apr 04, 2012 10:33 AM by richma
Apr 02, 2012 07:54 AM|svsubith|LINK
For past some days I have been playing with ARR 2.5 in IIS 7.0.
I have a Main Server which is configured with ARR. ARR routes request to two server SERVER1 and SERVER2. Same copy of the web application is configured in all the servers. The web application heavily depends on Cache for storing user specific data.If ARR
decide to route a request, for example "http://MainServer/getSomeValue.ashx?PARAM1=1234&PARAM2=test"to SERVER1, when the the same request(querystring is also same) comes second time ARR should choose the same server that is previously routed.
But currently ARR is routing to different servers. One thing I want to know is, whether it is possible to route a request based on querystring value?
Immediate help is highly appreciable.
Thank you in advance
Application Request Routing 2.5
Query string Hash
Apr 02, 2012 09:48 AM|richma|LINK
Have you tried enabling Client Affinity ?
Apr 02, 2012 09:50 AM|richma|LINK
Just to clarify this won't route based on a query string and this is not something you could do dynamically , but it will affinitize the user to a specific application server.
Apr 04, 2012 12:48 AM|svsubith|LINK
Is there any way to route dynamically? If the querystring value comes under certain range say 1000-5000, then this request should route to a particular server. If it is not possible using ARR then is there any alternate way?
Apr 04, 2012 10:33 AM|richma|LINK
Out of the box if you know what the range will be and if the range 1000-5000 willl always go to server A and 5001 - 1000 to server B , then you could use the URLRewrite Rules to add condtions based on the QueryString and route accordingly.
Some Examples here:
Another option may also be a custom rewrite provider where you could add your own logic in the provider.