XAP

Leader Election

Overview

This section describes the SpaceClosed Where GigaSpaces data is stored. It is the logical cache that holds data objects in memory and might also hold them in layered in tiering. Data is hosted from multiple SoRs, consolidated as a unified data model.'s leader election mechanism, which is based on the CAP theorem. It also explains how to configure and optimize it.

CAP Theorem

The CAP theorem, also known as Brewer's theorem, states that it is impossible for a distributed computer system to simultaneously provide all three of the following guarantees:

image

Gigaspaces provides two available implementations to support the approach that is best suited to your environment and business needs.

Consistency based implementation is based on Apache ZookeeperClosed Apache Zookeeper. An open-source server for highly reliable distributed coordination of cloud applications. It provides a centralized service for providing configuration information, naming, synchronization and group services over large clusters in distributed systems. The goal is to make these systems easier to manage with improved, more reliable propagation of changes., whereas availability based is based on the native Lookup Service.

Zookeeper is used to avoid split brain. This is because the instance that is disconnected from Zookeeper is suspended until it reconnects to Zookeeper. At this stage a decision is taken whether the instance can resume as primary or should become a backup.

GigaSpaces recommends that you use partition tolerance plus consistency. However, if your system does not include at least three machines, you can manually choose to work with partition tolerance plus availability.  

It is possible to start a cluster without using xap-manager and get the availability, but this means that you might risk split brain. If this option is required by your organization, please consult the GigaSpaces support team.