In a product environment, high availability is a must-have goal. is the Shard cluster architecture diagram after MongoDB 3.0.
A few points
1. MONGOs implements the same service interface as Mongod, listens to the same 27017 port, MONGOs receives the access request, forwards the request to the corresponding shard according to the sharding algorithm, and then merges the results returned by each shard back to the requester
In fact, there are other methods, such as using LVS to put multiple MONGOs under a domain name, the use of LVS load balancing. All Web servers then issue query/write requests only through this domain name. However, this method requires additional LVS support. In general, 1-to-1 scenarios are sufficient
2. When deploying the program, please deploy MONGOs together. For example, there is a Web server and a mongos. Web server always accesses MONGOs running locally, without specifying a heap of IP addresses and port numbers, which is the way to access replica set. Shard cluster mode, it is simple.
3. config server is essentially composed of Mongod replica set, which records metadata. Config server can use three low-provisioned servers, but be independent, not with Shard, MONGOs on a single server.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Build a highly available system architecture using MongoDB Shard cluster