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 extension 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. These are specified as part of the start server
gfsh command:
start server
--name=redisServer1
--locators=localhost[10334]
--server-port=0
--J=-Dgemfire-for-redis-enabled=true
--J=-Dgemfire-for-redis-port=6379
--J=-Dgemfire-for-redis-redundant-copies=2
--<additional settings>
The following describes the configuration options available, their default settings, and examples of their use.
NoteThe below settings apply on server start-up and cannot be changed at runtime.
--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 extension will be started.
--J=-Dgemfire-for-redis-enabled=true
--classpath
--classpath=/path/to/gemfire-for-redis-apps/folder/lib/*.jar
NoteThis property is for use only with VMware GemFire 9.15.
--J=-Dgemfire.extensions.repository.path
/path_to_gemfire/extensions/
.gfm
file.
--J=-Dgemfire.extensions.repository.path=/path/to/folder-containing-gfm/
NoteThis property is for use only with VMware GemFire 10.0.
--J=-Dgemfire-for-redis-port
6379
6379
is the same port that Open Source 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 Open Source 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
option on the
create region
gfsh command.: Example:
--J=-Dgemfire-for-redis-redundant-copies=1
NoteThis property must be set to the same value on every server in the cluster that enables VMware GemFire for Redis Apps.
--J=-Dgemfire-for-redis-use-default-region-config
true
false
, the VMware GemFire for Redis Apps service will not be enabled and the server will not accept Redis commands until a region with the configured region name is manually created.
--J=-Dgemfire-for-redis-use-default-region-config=true
NoteThis property must be set to the same value on every server in the cluster that enables VMware GemFire for Redis Apps.
--J=-Dgemfire-for-redis-region-name
GEMFIRE_FOR_REDIS
--J=-Dgemfire-for-redis-region-name=REGION1
NoteThis property must be set to the same value on every server in the cluster that enables VMware GemFire for Redis Apps.
--J=-Dgemfire-for-redis-maxmemory-policy
noeviction
--J=-Dgemfire-for-redis-maxmemory-policy=allkeys-lru
Valid options are noeviction
and allkeys-lru
.
NoteThis property must be set to the same value on every server in the cluster that enables VMware GemFire for Redis Apps.
--J=-Dgemfire-for-redis-maxmemory-eviction-percent
0
, which is equivalent to no maximum
gemfire-for-redis-maxmemory-deny-commands-percent
.
--J=-Dgemfire-for-redis-maxmemory-eviction-percent=65
--J=-Dgemfire-for-redis-maxmemory-deny-commands-percent
0
, which is equivalent to no maximum
gemfire-for-redis-maxmemory-eviction-percent
.
--J=-Dgemfire-for-redis-maxmemory-deny-commands-percent=85
--J=-Dgemfire-for-redis-notify-keyspace-events
K
Keyspace events, published with __keyspace@<db>__
prefix.E
Keyevent events, published with __keyevent@<db>__
prefix.g
Generic commands (non-type specific) like DEL
, EXPIRE
, RENAME
, …$
String commandsl
List commandss
Set commandsh
Hash commandsz
Sorted set commandst
Stream commandsd
Module key type eventsx
Expired events (events generated every time a key expires)e
Evicted events (events generated when a key is evicted)m
Key miss events (events generated when a key that doesn’t exist is accessed)A
Alias for g$lshztxed
, so that the AKE
string means all the events except m
.Example:
--J=-Dgemfire-for-redis-notify-keyspace-events=AKE
Note: For the RPOPLPUSH
and LMOVE
commands, VMware GemFire for Redis Apps sends the pop
notification (either rpop
or lpop
) first, followed by the push
notification (either rpush
or lpush
). This reflects the actual order of events that take place, but differs from Open Source Redis, which sends the push
notification first, followed by the pop
notification.
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 the gemfire-for-redis-enabled
, J=-Dgemfire-for-redis-use-default-region-config=false
and classpath
(if using VMware GemFire version 9.15) or gemfire.extensions.repository.path
(if using VMware GemFire version 10) parameters. For example:
start server
--J=-Dgemfire-for-redis-enabled=true
--J=-Dgemfire.extensions.repository.path=/path/to/gemfire-for-redis-apps/folder/
--J=-Dgemfire-for-redis-use-default-region-config=false
(Optional) To set a different region name than the default, also 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 extension.”
Create or set additional configurations as necessary. This may include configuring disk stores for persistence, or setting up data center (WAN) replication.
NoteUsing some features available in VMware GemFire may negatively impact performance.
NoteIf using the
--redundant-copies
option when creating the region, the value specified will override any value set using the--J=-Dgemfire-for-redis-redundant-copies
setting when starting the VMware GemFire for Redis Apps server.
The following are examples of custom region configurations.
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 --total-num-buckets=128 --gateway-sender-id=PDX-NY
For more information about WAN replication, see Multi-site (WAN) Configuration in the Vmware GemFire documentation.
In addition to the configuration settings described above, there are some settings that allow for more fine-grained control over certain behaviors but which should not typically need to be changed from their default values. The following describes the advanced configuration options available, their default settings, and examples of when a user might consider changing them.
--J=-Dgemfire-for-redis-hll-sparse-max-bytes
3000
--J=-Dgemfire-for-redis-hll-sparse-max-bytes=4000
NoteThis property must be set to the same value on every server in the cluster that enables VMware GemFire for Redis Apps.
--J=-Dgemfire-for-redis-expiration-interval-seconds
180
--J=-Dgemfire-for-redis-expiration-interval-seconds=10
--J=-Dgemfire-for-redis-write-timeout-seconds
10
--J=-Dgemfire-for-redis-write-timeout-seconds=20
Configuration of a VMware GemFire for TAS service instance with GemFire for Redis Apps enabled can be achieved using the parameters listed in the GemFire for TAS documentation when creating or updating a service instance.