- Mastering MongoDB 3.x
- Alex Giamas
- 147字
- 2021-08-20 10:10:47
Best practices for sharding
Sharding is MongoDB's solution for horizontal scaling. In Chapter 8, Storage 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.
推薦閱讀
- OpenStack for Architects
- 控制與決策系統仿真
- 圖解PLC控制系統梯形圖和語句表
- 大數據處理平臺
- CompTIA Linux+ Certification Guide
- Docker High Performance(Second Edition)
- Prometheus監控實戰
- 水下無線傳感器網絡的通信與決策技術
- Visual FoxPro數據庫基礎及應用
- PVCBOT機器人控制技術入門
- 基于企業網站的顧客感知服務質量評價理論模型與實證研究
- 電腦上網輕松入門
- Working with Linux:Quick Hacks for the Command Line
- 電腦上網入門
- Unreal Development Kit Game Design Cookbook