Region types define region behavior within a single cluster. You have various options for region data storage and distribution.
Within a VMware GemFire cluster, you can define distributed regions and non-distributed regions, and you can define regions whose data is spread across the cluster, and regions whose data is entirely contained in a single member.
Your choice of region type is governed in part by the type of application you are running. In particular, you need to use specific region types for your servers and clients for effective communication between the two tiers:
Cacheby servers and are accessed by clients that connect to the servers from outside the server’s cluster. Server regions must have region type partitioned or replicated. Server region configuration uses the
ClientCacheby clients and are configured to distribute data and events between the client and the server tier. Client regions must have region type
local. Client region configuration uses the
Cache. Peer regions may be server regions, or they may be regions that are not accessed by clients. Peer regions can have any region type. Peer region configuration uses the
When you configure a server or peer region using
gfsh or with the
cache.xml file, you can use region shortcuts to define the basic configuration of your region. A region shortcut provides a set of default configuration attributes that are designed for various types of caching architectures. You can then add additional configuration attributes as needed to customize your application. For more information and a complete reference of these region shortcuts, see Region Shortcuts Reference.
These are the primary configuration choices for each data region.
|Region Type||Description||Best suited for...|
|Partitioned||System-wide setting for the data set. Data is divided into buckets across the members that define the region. For high availability, configure redundant copies so each bucket is stored in multiple members with one member holding the primary.||Server regions and peer regions
|Replicated (distributed)||Holds all data from the distributed region. The data from the distributed region is copied into the member replica region. Can be mixed with non-replication, with some members holding replicas and some holding non-replicas.||Server regions and peer regions
|Distributed non-replicated||Data is spread across the members that define the region. Each member holds only the data it has expressed interest in. Can be mixed with replication, with some members holding replicas and some holding non-replicas.||Peer regions, but not server regions and not client regions
|Non-distributed (local)||The region is visible only to the defining member.||Client regions and peer regions
Partitioning is a good choice for very large server regions. Partitioned regions are ideal for data sets in the hundreds of gigabytes and beyond.
Note: Partitioned regions generally require more JDBC connections than other region types because each member that hosts data must have a connection.
Partitioned regions group your data into buckets, each of which is stored on a subset of all of the system members. Data location in the buckets does not affect the logical view - all members see the same logical data set.
Use partitioning for:
In partitioned regions, you can colocate keys within buckets and across multiple partitioned regions. You can also control which members store which data buckets.
Replicated regions provide the highest performance in terms of throughput and latency. Replication is a good choice for small to medium size server regions.
Use replicated regions for:
Distributed regions provide the same performance as replicated regions, but each member stores only data in which it has expressed an interest, either by subscribing to events from other members or by defining the data entries in its cache.
Use distributed, non-replicated regions for:
Note: When created using the
ClientRegionShortcut settings, client regions are automatically defined as local, since all client distribution activities go to and come from the server tier.
The local region has no peer-to-peer distribution activity.
Use local regions for: