YMatrix
Quick Start
Simulate Time Series Scenarios
Standard Cluster Deployment
Data Modeling
Connecting to The database
Data Writing
Data Migration
Data Query
Scene Application Examples
Federal Query
Maintenance and Monitoring
Global Maintenance
Partition Maintenance
Backup and Restore
Cluster Expansion
Enable Mirroring
Resource Management
Security
Monitoring
Performance Tuning
Troubleshooting
Reference Guide
Tool Guide
Data Type
Storage Engine
Execution Engine
Stream Processing
DR (Disaster Recovery)
Configuration Parameters
Index
Extension
SQL Reference
FAQ
This document introduces the mirror distribution strategy in the YMatrix database system.
When deploying a YMatrix database system, you can configure the mirror node (Mirror) on the host.
Notes!
The Mirror mechanism is highly recommended to be turned on in production environments.
Before elaborating YMatrix's mirror distribution strategy, we first use Greenplum's mirror distribution strategy as background knowledge to lay the groundwork. Greenplum can use two standard mirroring configurations: Group Mirroring and Spread Mirroring, where the group mirroring is its default configuration.
Hash mirror distribution spreads the Mirror of each host to the remaining hosts in the cluster and requires more hosts in the cluster than the Primary on each host.
To ensure an average spread, the number of independent hosts in the array must be greater than the number of node examples on each host.
_1689234437.png)
Group image distribution treats all the Mirrors of Primary on the same host as one group and are placed together on another host in the cluster.
This is Greenplum's default mirror distribution strategy.
_1689234443.png)
YMatrix adopts the Ring Mirroring strategy by default: that is, when there are at least two hosts, the Primary serial number sequence in one host is regarded as a one-dimensional paper tape, folded in half from the middle, and then arrange the Mirror evenly to other hosts from the folded intermediate serial number as the starting point on another host.
The addition of a new Primary will not affect the previously distributed closed loop of the mirror, but will open a new mirror loop.
This is YMatrix's default mirror distribution strategy.
_1689234430.png)
This strategy is a compromise method by neutralizing the pros and cons of the above two strategies. For comparison of the three strategies, please see the table below:
| | Hash distribution | Group distribution | Annular distribution | |--|--|--|--|--| | System Stable | Unstable | Stable | More Stable | | Load balancing | Balance | Unbalanced | More balanced |
Notes!
If you want to use a mirror distribution policy in YMatrix other than the Ring policy, you can do this by custom configuration mxaddmirrors.