当前位置:网站首页>Illustration of mongodb cluster deployment principle (3)
Illustration of mongodb cluster deployment principle (3)
2022-06-23 17:51:00 【Tom bomb architecture】
MongoDB There are three types of roles in the cluster deployment scenario of : The actual data storage node 、 Configuration file storage node and routing access node .
The connected client is directly connected to the routing node , Query data from the configuration node , Query and store data on the actual storage node according to the query results .MongoDB There are single machine deployment 、 Copy Collection ( The main equipment ) Deploy 、 Split deployment 、 Hybrid deployment of replica set and fragmentation .
The mixed deployment is shown in the figure :
In the mixed deployment mode, it is necessary to MongoDB The process of writing data is shown in the figure :
Read in mixed deployment mode MongoDB The data flow in is shown in the figure below :
For replica sets , There are two roles, master and slave , Writing data is different from reading data , The process of writing data is to write only to the master node , From master node to slave node asynchronously :
While reading data only needs to read from any node , Specific to which node to read can be specified :
about MongoDB The fragmentation of , Let's say we use an index key (ID) For the chip key ,ID The range of 0,50, Divide into 5 individual chunk, Store separately to 3 In a slice server , As shown in the figure :
If there's a lot of data , When you need to add a slice server, you can just move chunk To divide the data evenly .
Configuration node :
The server that stores configuration files actually stores chip keys and chunk as well as chunk And server The mapping relation of , The data model of configuration node storage represented by the above data is shown in the following table :
Map1
Key range | chunk |
|---|---|
[0,10) | chunk1 |
[10,20) | chunk2 |
[20,30) | chunk3 |
[30,40) | chunk4 |
[40,50) | chunk5 |
Map2
chunk | shard |
|---|---|
chunk1 | shard1 |
chunk2 | shard1 |
chunk3 | shard2 |
chunk4 | shard2 |
chunk5 | shard3 |
Routing nodes :
Nodes with routing role play the role of load balancing in the case of fragmentation .
Pay attention to WeChat public number 『 Tom Bomb architecture 』 reply “MongoDB” Supporting materials are available .
This paper is about “Tom Bomb architecture ” original , Reprint please indicate the source . Technology is about sharing , I share my happiness ! If you have any suggestions, you can also leave comments or private letters , Your support is the driving force for me to adhere to my creation . Pay attention to WeChat public number 『 Tom Bomb architecture 』 More technical dry goods are available !
Originality is not easy. , Persistence is cool , You can see it here , Little buddy, remember to praise 、 Collection 、 Looking at , One click three times plus attention ! If you think the content is too dry , You can share and forward it to friends !
边栏推荐
- Tencent Qianfan scene connector: worry and effort saving automatic SMS sending
- Réponse 02: pourquoi le cercle Smith peut - il "se sentir haut et bas et se tenir à droite et à droite"?
- What is the mobile account opening process? Is it safe to open an account online now?
- History of storage technology: from tape to hardware liquefaction
- 解答01:Smith圆为什么能“上感下容 左串右并”?
- [network communication -- webrtc] source code analysis of webrtc -- bandwidth estimation at the receiving end
- [go]沙盒环境下调用支付宝扫码支付
- Digital intelligent supply chain collaboration solution for new energy industry
- C. Product 1 Modulo N-Codeforces Round #716 (Div. 2)
- The principle of MySQL index algorithm and the use of common indexes
猜你喜欢

《MPLS和VP体系结构》

Redis cluster operation method

混沌工程在云原生中间件稳定性治理中的实践分享

Date selection of hotel check-in time and check-out time

Meituan Sanmian: how do you understand the principle of redis master-slave replication?

EasyPlayer移动端播放webrtc协议时长按播放页面无法关闭“关于我们”页面

How to configure MySQL log management

Easyplayer mobile terminal plays webrtc protocol for a long time. Pressing the play page cannot close the "about us" page

Practice sharing of chaos engineering in stability management of cloud native Middleware

【30. 串联所有单词的子串】
随机推荐
JS regular verification time test() method
[go] calling Alipay to scan code for payment in a sandbox environment
Troubleshooting of datanode entering stale status
浅谈5类过零检测电路
Spdlog logging example - create a logger using sink
How to create a three elimination game
Petitpotam – NTLM relay to ad CS
Self supervised learning (SSL)
酒店入住时间和离店时间的日期选择
MySQL transaction submission process
How to use SQL window functions
解答01:Smith圆为什么能“上感下容 左串右并”?
[qsetting and.Ini configuration files] and [create resources.qrc] in QT
如何设计一个秒杀系统?
Single fire wire design series article 10: expanding application - single fire switch realizes double control
Importance of ERP management system
Installation, configuration, désinstallation de MySQL
手机开户一般哪个证券公司好?在线开户安全么?
What does the timestamp 90K mean?
[go]沙盒环境下调用支付宝扫码支付