如何确保用户不会从只读的 Redis 从站读取陈旧(尚未同步)的数据?

How is it ensured that a user is not reading stale(not yet synced) data from read only Redis slave?

我正在学习 Redis 复制,我了解以下事实

1. By Default replicas are read only.
2. All writes happen to master
3. Master writes changes to internal buffer and then sends them slave for sync
4. Slave receives the buffered information and writes them to their memory

我这里有一个doubt/curiosity -

让我们假设 master 有一个 key:value 作为 name:rishi。 这个键值在slave中也是in-sync/replicated。

现在用户用新值 name:coder 更新键名,master 将数据放入内部缓冲区以使其与 slave/s 同步。

然后,在从属更新之前,Redis 会收到一个针对“name”键的读取查询,是否有可能从 salve 中读取陈旧数据?

是的,有一小段时间 window 可以从副本(从属)节点读取旧数据。

参考:Redis Replication