In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Utilization of single sliced disk
Utilization rate of single shard cpu
Test cluster ops value
Average latency of the test cluster in microseconds (us)
7 sliced 100 million read-only data charts:
The iOS value of a single slice
Utilization of single sliced disk
Utilization rate of single shard cpu
Test cluster ops value
Average latency of the test cluster in microseconds (us)
7 sliced 300 million read-only data charts:
The iOS value of a single slice
Utilization of single sliced disk
Utilization rate of single shard cpu
Test cluster ops value
Average latency of the test cluster in microseconds (us)
Supplementary information
1. Create a replica set
Copy set on the configside:
A shard cluster with stable architecture should need multiple node replica sets to prevent the phenomenon of all-hanging, which is the basic requirement for data security. We also mentioned above that after version 3.4, the startup of mongos has been forced to use the copy set mode on the config. if you don't have a copy set, you won't be able to start it, so here's a special addition.
First of all, in the case of 3.4, our config side must establish a replica set, so set it on the config side, which is a parameter replSet emphasized above.
# Open the config configuration file vim / usr/local/mongodb/mongod_config_20000.conf. . . # enable the replica set function and specify the replica set name as configsreplSet=configs
Of course, as mentioned above, if you need at least one or three config terminals, then we need to open three config terminals without detailed analysis of the specific configuration, and don't complain about why they are put together, just testing.
# take a look at how many configuration files ll / usr/local/mongodb/drwxr-xr-x. 2 root root 248 Mar 14 10:21 bin-rw-r--r--. 1 root root 34520 Feb 23 03:53 GNU-AGPL-3.0-rw-r--r--. 1 root root 622 Mar 14 14:26 mongod_config_20000.conf-rw-r--r--. 1 root root 622 Mar 14 14:28 mongod_config_20001.conf-rw-r--r--. 1 root root 622 Mar 14 14:35 mongod_config_20002.conf-rw-r--r--. 1 root root 419 Mar 14 14:41 mongos_route_30000.conf# take a look at the running mongo process ps aux | grep mongoroot 17211 1.1 0.7 1718800 60916? Sl 14:36 1:57 mongod-f / usr/local/mongodb/mongod_config_20000.confroot 17244 1.0 0.7 1551432 58216? Sl 14:36 1:41 mongod-f / usr/local/mongodb/mongod_config_20001.confroot 17277 1.0 0.7 1551432 57920? Sl 14:36 1:40 mongod-f / usr/local/mongodb/mongod_config_20002.conf# take a look at the current port situation ss-ntplu | grep mongotcp LISTEN 0 128 *: 20000 *: * users: (("mongod", pid=17211,fd=11)) tcp LISTEN 0 128 *: 20001 *: * users: ("mongod" Pid=17244,fd=11)) tcp LISTEN 0 128 *: 20002 *: * users: (("mongod", pid=17277,fd=11))
All three can be used, but it is only created, and the relationship still needs to be initialized, just like mysql's change master.
# Connect one of the configs mongo-- port 2000 commands and add the association > config = {_ id: "configs", members: [{_ id:0, host: "10.21.1.205config 20000"}, {_ id:1, host: "10.21.1.205config 20001"}, {_ id:2, host: "10.21.1.205config 20002"}} # initialize the replica set rs.initiate (config)
Note the appearance of "ok": 1. That is successful initialization. If it is not successful, you need to see what went wrong, including permissions.
Chown-R mongodb:mongodb / data/mongodb/
Then start again, ok, then you can use it, and happily use mongos to start the router.
Copy set of node fragments:
If it is a copy set of node fragments, it is a little different, and the parameters are the same.
# Edit the configuration file vim / usr/local/mongodb/mongod_data_40001.conf. . . # enable the replica set function and specify the replica set name as shard1replSet=shard1
You are not forced to use many copy sets here, two, three, ten is fine, as long as you feel necessary, it will not be described in detail here. But the relationship, of course, is necessary.
# Connect to one of the nodes mongo-- port 4000 enter the management database admin > use admin# enter the command, add the association relationship, and the different points above are also here, > config = {_ id: "shard1", members: [{_ id: 0, host: "10.21.1.208use admin# 40001"}, {_ id: 1, host: "10.21.1.208 use admin# 40002"}, {_ id: 2 Host: "10.21.1.208 true 40003", arbiterOnly: true}]} # initialize the replica set, here is the same rs.initiate (config)
The difference is the arbiterOnly parameter, which indicates that the member is an arbitration node and does not receive data. The reason for using him is that when the replica set fails, an arbitration mechanism is needed to decide who will receive the new data on top, which belongs to the failover mechanism or is more rigorous.
Add shards to the node replica set:
In addition, due to the creation of the replica set, the addition of the fragment is a little different, but the deletion is the same, just press the name of the fragment.
# sh.addShard ("shard1/10.21.1.208:40001,10.21.1.208:40002,10.21.1.208:40003") how to add parts in replica set mode
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.