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

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.
主站蜘蛛池模板: 迁西县| 基隆市| 南安市| 建湖县| 周至县| 丁青县| 普兰店市| 镇康县| 双城市| 鹤峰县| 盘山县| 平和县| 东宁县| 绥阳县| 平昌县| 海林市| 集贤县| 平湖市| 东台市| 五台县| 阳高县| 新源县| 广河县| 玉林市| 汕头市| 湖北省| 凤城市| 通渭县| 湛江市| 广汉市| 临海市| 屯昌县| 民和| 滁州市| 乌鲁木齐市| 临夏县| 济源市| 海原县| 德州市| 夏河县| 凉山|