Amazon ElastiCache Installation

Last Updated: May 12, 2021
documentation for the dotCMS Content Management System

When running dotCMS Enterprise edition on Amazon EC2, you may configure the dotCMS cache to use Amazon ElastiCache to improve performance.

Note: Amazon ElastiCache provides two options for cache providers, MemCache and Redis. The dotCMS distribution supports the Redis Cache Provider, not MemCache. So to use ElastiCache with dotCMS, both dotCMS and the ElastiCache server must be configured to use Redis.

The following sections provide instructions for how to configure ElastiCache with dotCMS on EC2:

dotCMS Configuration

1. Configure the EC2 Server

Please see the EC2 Installation with Amazon's Linux AMI documentation for details on how to configure the dotCMS EC2 server.

ElastiCache Configuration

The following configuration settings are required for the ElastiCache cluster. If a value for a given configuration setting is not specified below, you may choose any value for that setting.

2. Select the Redis Engine

3. Specify the Cluster Details

  • Engine Version: 2.8.22 or higher.
    • Note: Earlier Engine versions may work, but the latest version of dotCMS has only been tested with the latest Engine versions.
  • Enable Replication: Not required.
  • Port: This MUST match the port configured in the dotCMS dotmarketing-config.properties file.
  • Cache Size: 10GB minimum.
    • Examples: cache.m1/m2/m3.xlarge or cache.r3.large Node Types.
  • Number of Read Replicas: 1 or higher.

4. Configure Advanced Settings

  • VPC Security Group(s): This MUST match the VPC of the EC2 server where dotCMS is running.

5. Start the ElastiCache Server

Connecting the dotCMS and ElastiCache Servers

After the ElastiCache cluster has been started, you can configure dotCMS to connect use Redis on the cluster.

Note: It is recommended that you do not configure dotCMS to use the ElastiCache cluster until after the ElastiCache cluster has been started. Configuring dotCMS before the ElastiCache cluster is running will not prevent dotCMS from working properly, but will generate repeated connection error messages in the dotCMS log files until the ElastiCache cluster is started.

6. Configure the dotCMS cache chain to use the Redis Cache Provider

For more information on how to configure the cache, please see the following documentation:

7. Apply a dotCMS Enterprise License

The Redis cache provider can only be used with dotCMS Enterprise editions, so you must apply an Enterprise license before the cache chain configuration will be activated.

Note:

  • If your Enterprise license is applied before changing the cache configuration, you must restart dotCMS so the cache configuration changes will be read and applied. However if you apply the Enterprise license after the cache configuration is changed, no restart is needed, since the cache configuration will be re-read as soon as the license is applied.

Verifying the Connection

When you apply an Enterprise license or restart dotCMS, dotCMS reads the cache configuration properties and writes messages to the log file indicating the cache providers used and the size of the cache regions created. To verify that dotCMS is using the Redis cache provider, search the dotcms.log file for “redis”, and verify that there are no connection error messages displayed in the log file.

On this page

×

We Dig Feedback

Selected excerpt:

×