RAID (Redundant array of independent disk, redundant array of independent disks, formerly known as Redundant Array of inexpensive
disk, redundant array of inexpensive disks) is a technique that allows us to use multiple disks as a single piece of disk. You can use it to raise
High-disk reliability or performance, or both. A set of disks that use RAID technology is called a RAID disk array.
RAID depending on performance, there are a variety of configuration methods, often taking into account the speed and fault tolerance. The following are some of the most common configuration methods.
RAID0
Use disk striping to tie multiple disks together to improve performance. Each disk holds part of the data,
Similar to a shard in MongoDB. Because there are multiple underlying disks, large amounts of data can be written to disk at the same time. This party
To improve write efficiency. However, if one of the disks fails to cause data loss, there is no backup of the data. This
can also cause slower reads (especially on Amazon's elastic Block store service), because some data volumes may be more
Some are slower.
RAID1
Use mirroring to improve reliability. The same copy of the data is written to each member of the array. The performance of this method should be
is lower than RAID0 because a slow member in the array slows down the entire array's write speed. However, if one of the disks is sent
can also find a copy of the data on other members of the array.
RAID5
Based on the use of disk segmentation technology, additional data is stored in the verification information to prevent server failure resulting in data loss. General situation
, the RAID5 can automatically handle a piece of disk when it fails, and the user does not feel that the failure occurred. However, this also makes
The RAID5 becomes the slowest of these RAID configuration scenarios because it requires that the checksum information be computed when the data is written.
MongoDB is a typical number of times a small amount of data write work, so the cost of using RAID5 is particularly
View.
RAID10
RAID10 is a combination of RAID0 and RAID1: Data is split to increase speed and mirrored to improve reliability.
It is recommended to use RAID10, which is more secure than RAID0 and can solve RAID1 performance problems. It was felt that on the basis of the replica set
With RAID1 some waste, so choose RAID0. This is a matter of personal preference: How much risk do you have to assume for performance?
Do not use RAID5, it is very very slow.
RAID classification Description (from MongoDB authoritative guide)