When you create a Tanzu GemFire cluster or service instance with the Tanzu GemFire for Redis Apps add-on enabled, a default region is created in the cluster. This created region has a small set of configuration options available, depending on the Tanzu GemFire deployment.

Default Region Configuration and Settings

When starting a Tanzu GemFire server with Tanzu GemFire for Redis Apps enabled, a number of configuration options are available. For example:

start server
--name=redisServer1
--locators=localhost[10334]
--server-port=0
--J=-Dgemfire-for-redis-enabled=true
--classpath=/path/to/gemfire-for-redis-apps/folder/lib/*
--J=-Dgemfire-for-redis-port=6379
--J=-Dgemfire-for-redis-bind-address=127.0.0.1
--J=-Dgemfire-for-redis-username=default
--J=-Dgemfire-for-redis-redundant-copies=1
--J=-Dgemfire-for-redis-use-default-region-config=true

The following describes the configuration options available, their default settings, and examples of their use.


--name
Defaults to <random string>
Specifies the name of the server. When not set, Tanzu GemFire assigns a random string to the server. We recommend that you set this to redisServer<number of the server> to allow you to quickly identify the Tanzu GemFire cluster running the Redis server.
Example:
--name=redisServer1


--locators
Defaults to localhost[10334]
Specifies the locators for the cluster that this server is joining.
Example:
--locators=localhost[10334]


--server-port
Defaults to 40404
Specifies the port number on which Tanzu GemFire clients can connect to the cluster. If not specified, the server port number defaults to 40404. To start additional servers, you must specify a different server port number, or use --server-port=0. Using --server-port=0 instructs Tanzu GemFire to use an arbitrary available port for the server port number.
Example:
--server-port=0


--J=-Dgemfire-for-redis-enabled
Defaults to false
When set to true, a VMware Tanzu GemFire server with the VMware Tanzu GemFire for Redis Apps add-on will be started.
Example:
--J=-Dgemfire-for-redis-enabled=true


--classpath
No default value.
Specifies the file path to the Tanzu GemFire for Redis Apps add-on.
Example:
--classpath=/path/to/gemfire-for-redis-apps/folder/lib/*


--J=-Dgemfire-for-redis-port
Defaults to 6379
Specifies the port number on which the VMware Tanzu GemFire server listens for Redis commands. Note that the default port number 6379 is the same port that OSS Redis uses by default.
Example:
--J=-Dgemfire-for-redis-port=6379


--J=-Dgemfire-for-redis-bind-address
Defaults to 127.0.0.1
Specifies the host address on which VMware Tanzu GemFire for Redis Apps listens. If set to an empty string or if not specified, the server listens on all local addresses.
Example:
--J=-Dgemfire-for-redis-bind-address=127.0.0.1


--J=-Dgemfire-for-redis-username
Defaults to default
Specifies the default username that the server uses when a client attempts to authenticate using only a password. Note that the default username default is the same as the default username that OSS Redis uses. See Security for more information about configuring and using Tanzu GemFire’s security.
Example:
--J=-Dgemfire-for-redis-username=default


--J=-Dgemfire-for-redis-redundant-copies
Defaults to 1
Specifies the number of redundant copies that VMware Tanzu GemFire for Redis Apps will attempt to keep in the cluster. A value of 0 means that no extra copies of data will be stored in the cluster.

The creation of redundant copies requires additional running servers. Without additional running servers, redundant copies will not be created regardless of the value set for this option. For example, if a cluster has only one server, no redundant copies will exist regardless of the set value.

Note: VMware Tanzu GemFire for Redis Apps uses a VMware Tanzu GemFire partitioned region to implement redundant copies, and this property corresponds to the partitioned region’s redundant-copies attribute. This property must be set to the same value on every server in the cluster that runs a VMware Tanzu GemFire server.
Example:
--J=-Dgemfire-for-redis-redundant-copies=1


--J=-Dgemfire-for-redis-use-default-region-config
Defaults to true
Specifies whether or not to use the default name for the GemFire for Redis Apps region.
Example:
--J=-Dgemfire-for-redis-use-default-region-config=true


--J=-Dgemfire-for-redis-region-name
Defaults to GEMFIRE_FOR_REDIS
Specifies the name of the GemFire for Redis Apps region.
Example:
--J=-Dgemfire-for-redis-region-name=REGION1


Custom Region Configuration and Settings

In some cases, you may need to configure a region beyond the default settings mentioned above.

To create a custom region:

  1. Start a server. As a minimum, you must set a classpath and J=-Dgemfire-for-redis-use-default-region-config=false. For example:

    start server
    --classpath=/path/to/gemfire-for-redis-apps/folder/lib/*
    --J=-Dgemfire-for-redis-use-default-region-config=false
    

    (Optional) To set a different region that the default, set the following parameter:

    --J=-Dgemfire-for-redis-region-name=<REGION-NAME>
    

    Where <REGION-NAME> is the name of the region. When set, a message is logged in the server logs reading, “Waiting for region <region name> to appear before starting the GemFire for Redis Apps add-on.”

  2. Create or set additional configurations as necessary. This may include configuring disk stores for persistence, or setting up data center replication.

    Note: Using some features available in Tanzu GemFire may negatively impact performance.

  3. Create a Partitioned region with the appropriate settings. You must use a region type of Partitioned. This triggers the server started above to start.

Custom Region Configurations

The following are examples of custom region configurations.

  • A region with data eviction configured:

    gfsh create region --name=GEMFIRE_FOR_REDIS --type=PARTITION_REDUNDANT --eviction-max-memory=1000 --eviction-action=local-destroy
    

    For more information about configuring data eviction, see Configure Data Eviction in the Vmware Tanzu GemFire documentation.

  • A region with data persistence enabled:

    gfsh create region --name=GEMFIRE_FOR_REDIS --type=PARTITION_REDUNDANT_PERSISTENT --total-num-buckets=128
    

    This creates a persistent region using the default disk store. For more information about disks stores, see Disk Storage in the Vmware Tanzu GemFire documentation.

  • A region with WAN replication enabled:

    gfsh create region --name=GEMFIRE_FOR_REDIS --type=PARTITION_REDUNDANT --gateway-sender-id=PDX-NY
    

    For more information about WAN replication, see Multi-site (WAN) Configuration in the Vmware Tanzu GemFire documentation.

check-circle-line exclamation-circle-line close-line
Scroll to top icon