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?
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.
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?
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.
svsubith
7 Posts
ARR Loadbalancing - Route based on query string value
Apr 02, 2012 11:54 AM|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
Regards,
SUBITH
ARR Application Request Routing 2.5 Query string Hash
richma
1084 Posts
Microsoft
Re: ARR Loadbalancing - Route based on query string value
Apr 02, 2012 01:48 PM|LINK
Have you tried enabling Client Affinity ?
http://technet.microsoft.com/en-us/library/dd443543(v=WS.10).aspx
richma
1084 Posts
Microsoft
Re: ARR Loadbalancing - Route based on query string value
Apr 02, 2012 01:50 PM|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.
hth
Richard
svsubith
7 Posts
Re: ARR Loadbalancing - Route based on query string value
Apr 04, 2012 04:48 AM|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?
richma
1084 Posts
Microsoft
Re: ARR Loadbalancing - Route based on query string value
Apr 04, 2012 02:33 PM|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:
http://learn.iis.net/page.aspx/465/url-rewrite-module-configuration-reference/#UsingServerVars
http://stackoverflow.com/questions/2257403/iis-url-rewrite-module-redirect-based-on-querystring
Another option may also be a custom rewrite provider where you could add your own logic in the provider. http://learn.iis.net/page.aspx/804/developing-a-custom-rewrite-provider-for-url-rewrite-module/
HTH
Richard