3rd-Eden / memcached

A fully featured Memcached client build on top of Node.js. Build with scaling in mind so it will support Memcached clusters and consistent hashing.
MIT License
1.31k stars 276 forks source link

config best practices #339

Open KashiMoonactive opened 5 years ago

KashiMoonactive commented 5 years ago

Hi, In our application we want to add a caching layer for certain data and during our testing we tested the behaviour of the app when cache is down and we encountered a big delay with the client until it resulted in a timeout (more than 2-3 seconds). I have tried to play around with the config and after changing the global of minTimeout and maxTimeout to 50 and retry to 2 the request failed fast. On the otherhand on our CPU intensive machines this low threshold causes error Error: Server at memcache-url.com:11211 not available at Client.memcachedCommand

Does anyone have a recommended config, how do you control the timeout of your request? Also can anyone recommend a client that support auto discovery for aws cluster memcached?

Thanks ahead

adri commented 5 years ago

I'm also experiencing this error and would be interested in how to debug/set proper config values.

calvintalbot commented 3 years ago

I encountered the exact same error and managed to resolve it. That error seems to happen when you are not able to communicate from your server to the elasticache node. I'm not sure if my setup is the same as yours, however here are a few steps you can look into:

Other important items you need to consider