Introduction to MongoDB database cluster fragmentation technology

1. Fragmentation Fragmentation is to split and save the data in the database on different machines; Sharding includes manual sharding and automatic sharding; MongoDB supports automatic sharding; Two, mongos MongoDB needs the routing process mongos, mongos knows where all the data is stored, and the application connects to mongos to send requests. mongos hides the fragmentation details from the application and forwards the request to the corresponding database machine; 3. Chip key 1. The slice key is used as the basis for data splitting, and MongoDB splits the data according to the slice key; According to the addition and deletion of the number of machines, MongoDB will rebalance the data to make its traffic more balanced; 2. Shard key type Shard keys include incremental shard keys and random shard keys; Like “timestamp” is an incremental shard key, the feature is that the data writing will be concentrated on one server, and the data query speed is very fast; The choice of shard key will affect the operation of data query 4. Create shards Fragmentation consists of three components, namely: slice, mongos, configuration server; Slices: collection data containers mongos: router process Configuration server: store cluster configuration information 1. Start the configuration…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索