mongodb sharding cluster (cluster fragmentation)

MongoDB's auto-sharding function means mongodb automatically create a horizontal extension of the database cluster system by mongos, the sub-table database stored on each node of sharding. Replica Sets Sharding and by combining, can build high availability, automatic horizontal expansion of a distributed cluster. To build MongoDB Sharding Cluster, you need three roles: Shard Server: mongod instance, use the Replica Sets, ensure that each node has a data backup and automatic failover, automatic recovery. For storing the actual data block, a production environment shard server role can be set a few machines bear a relica set, prevent single points of failure host Config Server: mongod instance, using the configuration server 3, to ensure the integrity of the metadata ( two-phase commit). Storing the entire Cluster Metadata, including the chunk information. Route Server: mongos instance, with the LVS, load balancing, to improve access performance (high performance). Front-end routing, client access therefrom, and the whole cluster look like a single database front-end applications can transparently use. Environment as follows: 192.168.198.131 shard1: 10001 shard2: 10002 shard3: 10003 config1: 20000 192.168.198.129 shard1: 10001 shard2: 10002 shard3: 10003 config2: 20000 192.168.198.132 shard1: 10001 shard2: 10002 shard3: 10003 config3: 20000 192.168. 198.133 mongos: 30000 were installed on three servers mongod services, installation is as follows: # wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.0.3.

Reproduced in: https: //my.oschina.net/766/blog/211517

Guess you like

Origin blog.csdn.net/weixin_33701294/article/details/91548024
Recommended