开发者

Using Memcache for Centralization of Distributed Cache Against DB

开发者 https://www.devze.com 2023-04-01 07:12 出处:网络
I am new to memcache and wondering if the following thought works or existed with successful cases or just rubbish going into the bin? Spare me and any guidance is highly appreciated. Here goes...

I am new to memcache and wondering if the following thought works or existed with successful cases or just rubbish going into the bin? Spare me and any guidance is highly appreciated. Here goes...

Currently there is 1 MySQL DB already using memcache by using it's spare memory to feed the hungry webserver that serves the frontend. Now we are going to introduce a new DB and webserver again and being not to starve a son to feed another, we are looking at alternative ways to do memcache so that in the future more DB and webservers can be added quickly by:

  • Introduce a standalone server that is dedicated to run memcache and stuff it with lots of RAMs despite average CPUs and hard disk specs
  • Get all DB instances to feed the memcache server of stuff that requires caching (to be served to multiple web servers)
  • Monitor memcache utilization fro开发者_运维知识库m time to time to get ready future scaling by introduce more cluster memcache to share the load.
  • The cache strategy and contents can be re-used across multiple webservers that having the same genre or data being cache.

If this design works, what sort of fallbacks or precautions that people already faced? So that I could learn from others by not repeating the done mistakes.

Thanks


There is one thing that you need to be carefull about with this design:

What happens when the memcache server restarts (or fails). You then loose all your cache, best case is that your site slows down while the cache is rebuilt, worst case is that your site is down untill the cache is rebuilt.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号