Replicate Memcached to multiple servers


Replicate Memcached to multiple servers



I have the following code:

private bool CheckForDuplicatesInCache(Message theMessage) {     var cacheClient = MemcachedClient.GetInstance("IntegrationCache");     var messageHash = theMessage.GetHashCode();     if (cacheClient.Get(messageHash.ToString()).IsNotNull())     {         IntegrationContext.WriteLog("Warning: This message is a duplicate. Will Not Process.");         return false;     }                 cacheClient.Set(messageHash.ToString(), "nothing", new TimeSpan(2, 0, 0));      return true; } 

The problem is, when I scale this to multiple servers...I need to have multiple memcached intances that share data for redundancy. Does anyone have any insight?




Visual Studio 2010 RC + ASP.NET MVC 2 RTM won't re-target from .NET Framework 4 to 3.5

1:



MVC2 and Session Start Event
There are 2 ways you could theoretically do it:.
Test Function in MVC Project
There is a product called repcached, however it only runs on linux right now.


WebHost4Life host migrated my .NET MVC site and now membership functionality does not work
It has the ability to replicate the cache to a different server..
SSI-like feature in ASP.NET / ASP.NET MVC
The other option is in code: you could write the value to BOTH caches and check for it in both chaches.


how do i load thousands of rows in my asp.net mvc project from database into slickgrid?
If you add more than 2 servers, you could do it in a for loop..
HTML.DropDownList values from multiple sources?
        private bool CheckForDuplicatesInCache(Message theMessage)     {         var cacheClient = MemcachedClient.GetInstance("IntegrationCache");         var cacheClient2 = MemcachedClient.GetInstance("IntegrationCache2");         var messageHash = theMessage.GetHashCode();         if (cacheClient.Get(messageHash.ToString()).IsNotNull())         {             IntegrationContext.WriteLog("Warning: This message is a duplicate. 


Authentication for IIS content in virtual directory under ASP.NET MVC website
Will Not Process."); return false; } if (cacheClient2.Get(messageHash.ToString()).IsNotNull()) { IntegrationContext.WriteLog("Warning: This message is a duplicate.

Will Not Process."); return false; } cacheClient.Set(messageHash.ToString(), "nothing", new TimeSpan(2, 0, 0)); cacheClient2.Set(messageHash.ToString(), "nothing", new TimeSpan(2, 0, 0)); return true; }



60 out of 100 based on 15 user ratings 440 reviews

@