官术网_书友最值得收藏!

Best practices for sharding

Sharding is MongoDB's solution for horizontal scaling. In Chapter 8Storage Engines, we will cover how to use it in more detail, here are some best practices based on the underlying data architecture:

  • Think about query routing: Based on different shard keys and techniques, the mongos query router may direct the query to some or all of the members of a shard. It's important to take our queries into account when designing sharding so that we don't end up with our queries hitting all of our shards.
  • Use tag aware sharding: Tags can provide more fine-grained distribution of data across our shards. Using the right set of tags for each shard, we can ensure that subsets of data get stored in a specific set of shards. This can be useful for data proximity between application servers, MongoDB shards, and the users.
主站蜘蛛池模板: 延长县| 洮南市| 澳门| 阿鲁科尔沁旗| 桓台县| 穆棱市| 安宁市| 大丰市| 深泽县| 鄂州市| 滨海县| 东乡族自治县| 洪江市| 天柱县| 梅河口市| 娄底市| 阳曲县| 平武县| 曲沃县| 太仓市| 嘉鱼县| 德格县| 青龙| 苏州市| 平度市| 自治县| 石柱| 敦化市| 汤原县| 宁化县| 灌阳县| 定安县| 苍山县| 扶沟县| 荥阳市| 洛宁县| 宁远县| 宣恩县| 汝州市| 巴林左旗| 宣化县|