Mongodb sharding trial (4)

Source: Internet
Author: User
Tags mongodb sharding

1. config server

The configuration service instance has only one config database, which stores data shard information. And data is implemented. Unlike config server, mongos caches the config database data in config server, but the data is not implemented. Mongos synchronizes data from the config server according to certain conditions.

2. When does mongos pull data from config server.

A: (1) when the newly added mongos is started for the first time, it must pull data from the config server. Or after the mongos instance is restarted, the cached data is no longer available, so you must also pull the data from it.

(2) mongos must obtain the latest data after the config database data in config server changes. For example, after the data is migrated.

Note: When mongos synchronizes data from the config server, the data in the config database is read-only.

3. When will the config database data change?

A: (1) when the size of an existing block exceeds the default value, the block is split into two parts. In this case, the partition key range information corresponding to the block in the config database is changed.

(2) when data is migrated. Similarly.

4. As long as one of the config server instances is unavailable, the data in the config database is read-only. Because the data in the config database cannot be changed, data cannot be migrated in blocks. However, the sharding cluster can still provide read/write requests. When all the config server instances are unavailable, as long as the mongos instance is not restarted, The sharded cluster can still provide data reading and writing, but it cannot be divided into blocks and data migration.

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.