Creating Partitioned Tables / Configuring High Availability for Partitioned Tables |
With high availability, each member that hosts data for the partitioned table gets some primary copies and some redundant (secondary) copies.
Generally, you should not use redundancy when your applications can directly read from another data source, or when write performance is more important than read performance.
By default, GemFire XD places your primary and secondary data copies for you, avoiding placement of two copies on the same physical machine. If there are not enough machines to keep different copies separate, GemFire XD places copies on the same physical machine. You can change this behavior, so GemFire XD only places copies on separate machines.
You can also control which members store your primary and secondary data copies by using redundancy zones. Redundancy zones are configured at the member level. Redundancy zones let you separate primary and secondary copies by member groups, or zones. You assign each data host to a zone. Then GemFire XD places redundant copies in different redundancy zones, the same as it places redundant copies on different physical machines. You can use this to split data copies across different machine racks or networks, This option allows you to add members on the fly and use rebalancing to redistribute the data load, with redundant data maintained in separate zones. When you use redundancy zones, GemFire XD will not place two copies of the data in the same zone, so make sure you have enough zones.
By default, GemFire XD stores redundant copies on different machines. When you run your processes in VMware virtual machines, the normal view of the machine becomes the VMware VM and not the physical machine. If you run multiple VMWare VMs on the same physical machine, you could end up storing partitioned table primary buckets in separate VMware VMs, but on the same physical machine as your secondaries. If the physical machine fails, you can lose data. When you run in VMware VMs, you can configure GemFire XD to identify the physical machine and store redundant copies on different physical machines.
In this figure, M1 is reading W, Y, and Z. It gets W directly from its local copy. Since it doesn't have a local copy of Y or Z, it goes to a cache that does, picking the source cache at random.