This topic describes configuration defaults and options in VMware GemFire for Redis Apps.
When you create a VMware GemFire cluster or service instance with the VMware 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 VMware GemFire deployment.
When starting a VMware GemFire server with VMware 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
<random string>
redisServer<number of the server>
to allow you to quickly identify the VMware GemFire cluster running the Redis server.
--name=redisServer1
--locators
localhost[10334]
--locators=localhost[10334]
--server-port
40404
40404
. To start additional servers, you must specify a different server port number, or use
--server-port=0
. Using
--server-port=0
instructs VMware GemFire to use an arbitrary available port for the server port number.
--server-port=0
--J=-Dgemfire-for-redis-enabled
false
true
, a VMware GemFire server with the VMware GemFire for Redis Apps add-on will be started.
--J=-Dgemfire-for-redis-enabled=true
--classpath
--classpath=/path/to/gemfire-for-redis-apps/folder/lib/*
--J=-Dgemfire-for-redis-port
6379
6379
is the same port that OSS Redis uses by default.
--J=-Dgemfire-for-redis-port=6379
--J=-Dgemfire-for-redis-bind-address
127.0.0.1
--J=-Dgemfire-for-redis-bind-address=127.0.0.1
--J=-Dgemfire-for-redis-username
default
default
is the same as the default username that OSS Redis uses. See
Security for more information about configuring and using VMware GemFire’s security.
--J=-Dgemfire-for-redis-username=default
--J=-Dgemfire-for-redis-redundant-copies
1
0
means that no extra copies of data will be stored in the cluster.
redundant-copies
attribute. This property must be set to the same value on every server in the cluster that runs a VMware GemFire server.
--J=-Dgemfire-for-redis-redundant-copies=1
--J=-Dgemfire-for-redis-use-default-region-config
true
--J=-Dgemfire-for-redis-use-default-region-config=true
--J=-Dgemfire-for-redis-region-name
GEMFIRE_FOR_REDIS
--J=-Dgemfire-for-redis-region-name=REGION1
In some cases, you may need to configure a region beyond the default settings mentioned above.
To create a custom region:
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.”
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 VMware GemFire may negatively impact performance.
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 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 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 GemFire documentation.