6. Which is a good method for reducing network latency from client application to database cluster, in a sharded cluster? Check all that apply:
题目选项
- A.use queries that avoid the use of your shard key
- B.co-locate your mongos on the same host as a shard primary
- C.hosting your entire cluster in separate regions
答案置信度:中
正确答案:B
解析语言:中文
客户端到集群的网络延迟主要由 客户端→mongos→分片 的跳数决定,把 mongos 部署到离数据更近的位置(与分片主节点同机)能减少转发延迟(B)。A 会让查询避开分片键、变成广播查询,延迟更大;C 把整个集群拆到不同地域只会让跨地域往返更慢。