Locks

The Locks Service is used internally by the Application Server to coordinate access to shared cluster resources.

The Locks Service is automatically configured to use Redis when the server is running in "cluster" mode. A configuration block is only required if you do not use environment variables to define redis server configuration.

Configuration

{
    "locks": {
        "enabled": true,
        "type": "redis",
        "config": {
            "host": "{host}",
            "port": {port}
        }
    }
} 

Where host and port point to your Redis Server.

Environment Variables

You can also configure the Service using the following environment variables:

  • CLOUDCMS_LOCKS_TYPE - redis

You can configure the Redis Provider using the following settings:

  • CLOUDCMS_LOCKS_REDIS_ENDPOINT - the host
  • CLOUDCMS_LOCKS_REDIS_PORT - the port

Further, the Redis Provider will automatically draw from the following global Redis environment variables if you've set them:

  • CLOUDCMS_REDIS_DEBUG_LEVEL - either info, warn, error or debug
  • CLOUDCMS_REDIS_ENDPOINT - the host
  • CLOUDCMS_REDIS_PORT - the port