[英]Redis | Replication and common disk storage
I am just starting to use Redis for the first time. 我刚开始第一次使用Redis。 I have gone through the documentation and I came to know that Redis can be used in replication mode.
我遍历了文档,才知道Redis可以在复制模式下使用。 But, I have some questions which are still un-answered.
但是,我有一些问题尚未解决。 Let's have a quick view of use-case
让我们快速了解用例
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.
一个解决方案可以是我在单个服务器(例如web1)上使用Redis。 In this case requests on web2 uses Redis cache of web1.
在这种情况下,Web2上的请求使用Web1的Redis缓存。 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.
我想避免这种情况,因为我想利用Redis的全部性能,即从内存中读取。
Is there any other workaround? 还有其他解决方法吗?
If your master Redis instance is on Web1 then all writes will have to go here. 如果您的主Redis实例在Web1上,则所有写操作都必须在此处进行。 You can however read from the slave instance on Web2 locally.
但是,您可以在本地从Web2上的从属实例读取。
http://redis.io/topics/replication http://redis.io/topics/replication
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.