"2016-11-1" "persist in Learning" "DAY16" "MongoDB" "Replica set Shard"

Source: Internet
Author: User

Mongodb two ways to cluster

Copy set

is usually a master one from, a master more from

MongoDB requires a minimum of two nodes for replication. One is the master node, which handles client requests, and the rest is the slave node, responsible for replicating the data on the master node.

MongoDB each node common collocation method is: A master one from, a master many from.

The master node records all operations on it, oplog the primary node periodically from the node, and then performs these operations on its own copy of the data, ensuring that the data from the node is consistent with the primary node.

Replica set Features:
    • N-node clusters
    • Any node can be used as the master node
    • All write operations are on the primary node
    • Auto Fail-Over
    • Automatic recovery

Sharding

In MongoDB there is another cluster, that is, the Shard technology, can meet the requirements of a large number of MONGODB data volume growth.

When MongoDB stores massive amounts of data, a machine may not be enough to store data, or it may not be sufficient to provide acceptable read and write throughput. At this point, we can divide the data on multiple machines so that the database system can store and process more data.

Why use Shards
    • Copy all write operations to the master node
    • Deferred sensitive data is queried on the master node
    • A single replica set is limited to 12 nodes
    • When the volume of requests is large, there is insufficient memory.
    • Insufficient Local Disk
    • Vertical expansion is expensive

"2016-11-1" "persist in Learning" "DAY16" "MongoDB" "Replica set Shard"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.