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.

Configuration and Settings

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.

Note

The below settings apply on server start-up and cannot be changed at runtime.


--name
Defaults to <random string>
Specifies the name of the server. When not set, VMware 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 VMware 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 VMware 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 VMware 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 GemFire server with the VMware GemFire for Redis Apps extension will be started.
Example:
--J=-Dgemfire-for-redis-enabled=true

--classpath
No default value.
Specifies the file path to the VMware GemFire for Redis Apps extension jar files.
Example:
--classpath=/path/to/gemfire-for-redis-apps/folder/lib/*.jar
Note

This property is for use only with VMware GemFire 9.15.


--J=-Dgemfire.extensions.repository.path
Defaults to /path_to_gemfire/extensions/
Specifies the file path to the VMware GemFire for Redis Apps extension .gfm file.
Example:
--J=-Dgemfire.extensions.repository.path=/path/to/folder-containing-gfm/
Note

This property is for use only with VMware GemFire 10.0.


--J=-Dgemfire-for-redis-port
Defaults to 6379
Specifies the port number on which the VMware GemFire server listens for Redis commands. Note that the default port number 6379 is the same port that Open Source 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 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 Open Source Redis uses. See Security for more information about configuring and using VMware 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 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.

If using a custom region configuration, this setting is equivalent to the --redundant-copies option on the create region gfsh command.: Example:
--J=-Dgemfire-for-redis-redundant-copies=1
Note

This 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
Defaults to true
Specifies whether or not to use the default configuration for the GemFire for Redis Apps region. If set to 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.
Example:
--J=-Dgemfire-for-redis-use-default-region-config=true
Note

This 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
Defaults to GEMFIRE_FOR_REDIS
Specifies the name of the GemFire for Redis Apps region.: Example:
--J=-Dgemfire-for-redis-region-name=REGION1
Note

This 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
Defaults to noeviction
Specifies the eviction policy of the GemFire for Redis Apps region.
Example:
--J=-Dgemfire-for-redis-maxmemory-policy=allkeys-lru

Valid options are noeviction and allkeys-lru.

Note

This 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
Defaults to 0, which is equivalent to no maximum
Specifies the maximum amount of memory, as a percentage of the total heap size, to be used on an individual server before entries will be evicted. Must be less than the value set for gemfire-for-redis-maxmemory-deny-commands-percent.
Example:
--J=-Dgemfire-for-redis-maxmemory-eviction-percent=65

--J=-Dgemfire-for-redis-maxmemory-deny-commands-percent
Defaults to 0, which is equivalent to no maximum
Specifies the maximum amount of memory, as a percentage of the total heap size, to be used on an individual server before commands which write data will be denied. Must be greater than the value set for gemfire-for-redis-maxmemory-eviction-percent.
Example:
--J=-Dgemfire-for-redis-maxmemory-deny-commands-percent=85

--J=-Dgemfire-for-redis-notify-keyspace-events
Defaults to an empty string, which disables all notifications
Specifies the types of keyspace events that the VMware GemFire for Redis Apps server will notify clients of. Each event type is represented by a single letter:
  • 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 commands
  • l List commands
  • s Set commands
  • h Hash commands
  • z Sorted set commands
  • t Stream commands
  • d Module key type events
  • x 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.


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 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.”

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

    Note

    Using some features available in VMware 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.
    Note

    If 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.

Custom Region Configurations

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.

Advanced Configuration and Settings

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
Defaults to 3000
The maximum number of bytes to use in a HyperLogLog sparse representation. When a HyperLogLog using the sparse representation crosses this limit, it is converted into the dense representation. Decreasing this value will on average result in lower CPU usage but higher memory usage, as the dense representation is less memory efficient than the sparse representation but performs PFADD in O(1) compared to O(N) for the sparse representation.
Example:
--J=-Dgemfire-for-redis-hll-sparse-max-bytes=4000
Note

This 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
Defaults to 180
The interval in seconds at which the active expiration check will be performed. Every key present in the data store will be iterated over and removed if its expiration time has passed, which can be resource intensive if there are many keys present. Decreasing this value will result in keys being expired and removed closer to their configured expiration time but also increase overall CPU usage.
Example:
--J=-Dgemfire-for-redis-expiration-interval-seconds=10

--J=-Dgemfire-for-redis-write-timeout-seconds
Defaults to 10
The timeout in seconds for write operations between the VMware GemFire for Redis Apps server and connected clients. If a write operation cannot finish before this timeout is exceeded, an error will be returned to the client. While it may be possible to prevent timeout exceptions by increasing this value from the default, it is recommended to address the cause of the slow writes rather than increasing this value.
Example:
--J=-Dgemfire-for-redis-write-timeout-seconds=20

Configuration and Settings when using GemFire for TAS

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.

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