Pergunta

I have implemented HTTP Load Balancing using Application Request Routing for my web application. I have one Load balancer server and two application servers namely SERVER1 and SERVER2. I have configured the Client Affinity in my server farm in the load balancer server.

But the problem is that requests from same client are sent to different servers. This behavior I have confirmed in Monitoring and Management section in the server farm. Also I am getting following error in the client "Object reference not set to an instance of object".

This is because When the first request from the client hit the SERVER1 it created an object in the session of the SERVER1. Now the second request from the same client trying to access the object created in session. But the request is hitting the SERVER2 from load balancer instead of SERVER1. As there is no session exists in SERVER2 client is getting this error.

I understand that Client Affinity configuration is meant to handle this problem where in all the subsequent requests from the client are going to the same server which served the first request.

But in my case this feature is not working. Any solution to this will be very helpful.

Foi útil?

Solução

I found the solution ! The application was working fine with Firefox browser and not working with IE and Chrome. ARR uses a cookie to enable Client Affinity. The Cookie name will be used to set the cookie on the client. That said, the client must accept cookies for client affinity to work properly. Default cookie name is ARRAffinity.

To browse the application I was using the url servername/appname. ARRAffinity Cookie was not getting created when I am browsing the application from IE and Chrome. The cookie got created and the application was working fine when browsed the site using servername.domainname/appname

Outras dicas

Old tread but may be useful for someone.

Seems that it's an ie issue or "expected behavior when using Internet Explorer": if a site name does not contain at least one '.' then the ARR Client Affinity cookie is not sent back to the ARR therefore the ARR generates a new one.

So, valid work around is any alias including '.' (dot) as Nagendra mentioned servername.domainname

http://forums.iis.net/t/1178295.aspx?ARR+2+5+Client+Affinity+Not+Working

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top