Load balancing is not working properly in distributed environment.

May 29, 2009 at 2:53 PM


I have a little problem using the Sharedcache. Hope you guys can help me out. I am trying to use sharedcache with distributed servers. Everything works well ( distribution , load balancing) when all the servers online. But if one of the server goes down, even when the application(client) starts, the load balancing is not working good. Caching is not happening 100% at the online server.

For Ex: I have two servers that are setup as distributed caching environment. 60% of the caching data goes to one server and 40% or caching data goes to other server when both are online. But one of the server goes down then 60% of the caching data goes to the online server and I see the other 40% data is not cached at all. Is it something wrong with the load balancer ?

Thanks
Rajjan

May 29, 2009 at 5:00 PM

Hi Rajjan,

it would be helpful if you could post or send me some more details like your version, log files etc.

did you tried to analyze the code behind it?

regards,
roni

May 29, 2009 at 8:32 PM

Roni,

I sent you the log files. Please check it out.

Steps to reproduce:

1. Set up shared cached in two machines ( local and remote)
2. Add server info in the Test app

Normal Test
3. Run the Test app and select option 600 ( add 200  data)
4. Check the distributed data in the SharedCache Network overview (under notify app)
5. You can see the data is distributed 40-60% in one server and the remaining in the other server.
    This works ok.

Failover test
6. Stop the shared cache service in one of the machine ( local or remote - i tested both )
7. Now do the step 3 & 4 
   You can see the only 40-60% of the data is cahced and remaining data is missing

 

I am going through the code and try to figure it out...

 

Thanks

Jun 1, 2009 at 10:14 PM

Roni,

I fixed the issue. Do you need the codebase ? I just added a failover logic in CacheUtil.cs .

Jun 2, 2009 at 12:21 AM

thats great news, can you submit the code or send it to me?

regards,

roni

Jun 2, 2009 at 3:19 PM

I sent you the CacheUtil.cs file.  Thanks