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

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.
主站蜘蛛池模板: 梁河县| 措美县| 印江| 宕昌县| 柳江县| 逊克县| 毕节市| 乌拉特中旗| 晋江市| 广宗县| 台前县| 蓬溪县| 响水县| 西林县| 灵璧县| 泸定县| 松江区| 忻城县| 北京市| 平阳县| 信宜市| 东乡族自治县| 芜湖县| 博白县| 乡城县| 林芝县| 柯坪县| 永靖县| 澳门| 治多县| 固阳县| 荆门市| 来宾市| 定安县| 油尖旺区| 崇阳县| 吉安县| 赤水市| 临湘市| 石阡县| 巧家县|