caching - How to use redis for number of micro-services? -


i new redis. have been investigating on redis past few days.i read documentation on cache management(lru cache), commands ,etc. want know how implement caching multiple microservice(s) data . have few questions:

  1. can microservices data(cached) kept under single instance of redis server?
  2. should every microservice have own cache database in redis?

  3. how refresh cache data without setting expire? since consume more memory.

some more information on best practices on redis microservices helpful.

it's possible use same redis multiple microservices, make sur prefix redis cache key avoid conflict between microservices.

you can use multi db in same redis instance (i.e 1 each microservice) it's discouraged because redis single threaded.

the best way use 1 redis each microservices, can flush 1 of them without touch others.

from personal experience redis cache in production (with 2 millions keys), there no problem using expire. encourage use it.


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -