You can use distribution with and without acknowledgment, or global locking for your region distribution. Regions that are configured for distribution with acknowledgment can also be configured to resolve concurrent updates consistently across all Tanzu GemFire members that host the region.
Distributed scope is provided at three levels:
distributed-no-ack. Distribution operations return without waiting for a response from other caches. This scope provides the best performance and uses the least amount of overhead, but it is also most prone to having inconsistencies caused by network problems. For example, a temporary disruption of the network transport layer could cause a failure in distributing updates to a cache on a remote machine, while the local cache continues being updated.
distributed-ack. Distribution waits for acknowledgment from other caches before continuing. This is slower than
distributed-no-ack, but covers simple communication problems such as temporary network disruptions.
In systems where there are many
distributed-no-ack operations, it is possible for
distributed-ack operations to take a long time to complete. The cluster has a configurable time to wait for acknowledgment to any
distributed-ack message before sending alerts to the logs about a possible problem with the unresponsive member. No matter how long the wait, the sender keeps waiting in order to honor the distributed-ack region setting. The
gemfire.properties attribute governing this is
global. Entries and regions are automatically locked across the cluster during distribution operations. All load, create, put, invalidate, and destroy operations on the region and its entries are performed with a distributed lock. The global scope enforces strict consistency across the cluster, but it is the slowest mechanism for achieving consistency. In addition to the implicit locking performed by distribution operations, regions with global scope and their contents can be explicitly locked through the application APIs. This allows applications to perform atomic, multi-step operations on regions and region entries.