简体   繁体   中英

Redis | Replication and common disk storage

I am just starting to use Redis for the first time. I have gone through the documentation and I came to know that Redis can be used in replication mode. But, I have some questions which are still un-answered. Let's have a quick view of use-case

  • I have a clustered environment of Drupal 7 code base.
  • There are two web servers web1 and web2 and two DB servers DB1 and DB2
  • DB1 and DB2 are running in master-slave mode
  • I have to setup Redis on both web1 and web2, web1 as master and web2 as slave
  • I need same backend/disk storage for both master and slave

Is it possible to setup same backend/disk storage for both master and slave? A solution can be that I use Redis on a single server, eg on web1. In this case requests on web2 uses Redis cache of web1. In this case I will get a delay by network. I want to avoid this situation because I want to utilize full performance of Redis ie reading from the memory.

Is there any other workaround?

If your master Redis instance is on Web1 then all writes will have to go here. You can however read from the slave instance on Web2 locally.

http://redis.io/topics/replication

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM