I. Basic concepts of replica setsReplica set (replica set)MongoDB's replica set is a Mongod process instance cluster where data is replicated to each other in the cluster and is automatically failover.MongoDB's database replication adds redundancy,
Installed version: 3.0.7Installation machine: All machinesInstallation process:1. Use the Hadoop account to extract the/opt/hadoop/directory:$ TAR-ZXVF mongodb-${version}.tar.gz-c/opt/hadoop/2. Set up a soft link:$ ln-s/opt/hadoop/mongodb-${version}/
1: Start three instances- /Home/mongodb/db27017/-/home/MongoDB /db27018/-/home/mongodb/db27019 /mongodb27019.confThe configuration file is as follows:Verbose=true #日志信息vvvv=true #日志的级别logpath=/Home/Mongodb/db27019/Log/Mongodb.Log#日志文件logappend=true #
1. Test ToolsThis test chooses YCSB (Yahoo! Cloud System Benchmark) as the test Client tool. YCSB is a NoSQL test tool for Yahoo Open source, used to test the performance of a variety of NoSQL, project address:
1. Test ToolsThis test chooses YCSB (Yahoo! Cloud System Benchmark) as the test Client tool. YCSB is a NoSQL test tool for Yahoo Open source, used to test the performance of a variety of NoSQL, project address:
1. Shards of Monogdb (sharding)Sharding is a data storage method used by MongoDB for terabytes of data above the TB level.MongoDB uses a solution that splits the collection and then splits the data into several MongoDB instances.In shard mode,
Sharding is a distributed process, but the load of MongoDB is different from other loads, and in the whole MongoDB distributed cluster, there are the following roles:Mongos:mongos is a routing server that will distribute data to its own managed
In a product environment, high availability is a must-have goal. is the Shard cluster architecture diagram after MongoDB 3.0.A few points1. MONGOs implements the same service interface as Mongod, listens to the same 27017 port, MONGOs receives the
Shards (sharding is a method used by MongoDB to split large collections into different servers (or clusters), mainly for scenarios that address high throughput and large data volumes.
Compared with the existing sub-database sub-table, partitioning
Shardkey needs to be selected for sharding of collections stored in the MongoDB database. The selection of Shardkey determines whether the data distribution in the cluster is balanced.
Sharding Key (Shard key) must be selected for sharding of
Skip the theoretical things and go to the web page to introduce automatic sharding.
Or test with million data
Insert million pieces of data to a database without sharding.
Data storage:
Performance_^ [root @:/usr/local/mongodb/data/mongodb/test] #
Install and configure MongoDB in Ubuntu 16.04 LTS
MongoDB is a high-performance NoSQL database. Compared with relational databases, it also provides high performance and high flexibility. Here we will explain how to install and configure the MongoDB
Skip the theory. I have introduced automatic sharding on the internet... directly go to the configuration. Please leave a message if you have any questions.
Or test with million data
Insert million pieces of data to a database without sharding.
Data
In MongoDB there is another cluster, that is, sharding technology, similar to the SQL Server table partition, we know that when the amount of data reached the T level, our disk, memoryThat's how we deal with this scenario.One: ShardMongoDB uses a
Environment:Windows operating systemMongoDB 3.4 Community EditionGoal:Configure a shard cluster that contains two shards of one configuration server. Each of these shards and a configuration server is configured as a separate replica set. As shown
Disclaimer: Translation Official documents: http://docs.mongodb.org/master/tutorial/install-mongodb-on-red-hat/?_ga=1.146202678.362433698.1425911361Overview:Learn how to install MongoDB RPM packages under Rhel or CentOS with this tutorial.Packages
Starting with MongoDB 3.0, a running instance is required when the Mongorestore is restored. Earlier versions did not have this requirement.1. Deploy a replication set for each shard(1) Each member of the replication set initiates a
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.