Quick Start
Standard Cluster Deployment
Data Modeling
Connecting to The database
Data Migration
Data Query
Maintenance and Monitoring
Performance Tuning
Troubleshooting
Reference Guide
SQL Reference
FAQ
This document describes the mirroring strategies used in the YMatrix database system.
When deploying a YMatrix database system, mirror segments (Mirror) can be configured on separate hosts.
Note!
Mirroring is strongly recommended for production environments.
Before discussing YMatrix's mirroring strategy, this section provides background on Greenplum’s mirroring configurations. Greenplum supports two standard mirroring configurations: Group Mirroring and Spread Mirroring. Group Mirroring is the default.
In Spread Mirroring, mirrors from each host are distributed across the remaining hosts in the cluster. This configuration requires that the number of hosts in the cluster exceeds the number of primary segments per host.
To ensure even distribution, the number of independent hosts in the array must be greater than the number of segment instances per host.
_1689234437.png)
In Group Mirroring, all mirrors for primary segments on a single host are grouped together and placed on another host in the cluster.
This is the default mirroring strategy in Greenplum.
_1689234443.png)
YMatrix uses Ring Mirroring as the default strategy. With at least two hosts, the primary segment sequence on one host is treated as a one-dimensional tape, folded in half. Starting from the middle segment ID on the second host, mirrors are placed clockwise and evenly distributed across the other hosts.
When expanding the cluster by adding new primary segments, the existing mirror ring remains unchanged, and a new mirror ring is created.
This is the default mirroring strategy in YMatrix.
_1689234430.png)
This strategy balances the trade-offs of the two Greenplum approaches, offering a compromise between stability and load distribution. The following table compares the three strategies:
| Spread | Group | Ring | |
|---|---|---|---|
| System Stability | Unstable | Stable | Moderately Stable |
| Load Balance | Balanced | Unbalanced | Moderately Balanced |
Note!
If you wish to use a mirroring strategy other than Ring Mirroring in YMatrix, you can achieve this through custom configuration using mxaddmirrors.