I have 8 memcache instances running and used default hashing policy with failover set to False.
So, after lots of monitoring i came to know that some of my memcache instances gets down/ connection refused to client. I m using PHP client Library. At times, when i checked Stats for servers then there were few thousand connections. Then i changed my code to make connection when i need to SET or GET any Key and after the operation close the connection. My Approach is Get LOCK (pseudo like adding key with lock prefix) on Key then SET data then delete LOCK key. Then, it minimized close to no flapping. But still there is another problem. Now, i wanted to knwo the status of the server before doing any GET / SET operation as there are almost 50-100 concurrent(users) hits to Cache so obviously there will be Data Integrity issues. So to implement atomicity i need to know if Server is up and running then only perform update Cahe operation otherwise do nothing to cache. I have gone in infinite loop might over thinking it!! But as per my requirement i need 100% consistency in Real Time :) Please help me or guide me if my approach is wrong. Regards, Sagar
