Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在文档中,它没有概述最佳实践是什么——如果有人假设有 8 个 redis 节点,你会用包含所有 8 个节点的服务器数组初始化 phpredis 吗?
据我了解,客户端将遍历所有节点,因为它无法连接第一个节点。
带有 redis 集群的 phpredis 不会将负载均匀地分布在服务器阵列中,它几乎总是偏向于阵列中的前几个。
为了解决这个问题,请在服务器阵列上使用 shuffle,您会看到负载分布更均匀。