arrow-left
All pages
gitbookPowered by GitBook
1 of 1

Loading...

AWS ElastiCache

Create ElastiCache for Redis database and Memcache memory caching

Amazon ElastiCachearrow-up-right is a serverless caching service delivering real-time, cost-optimized performance for modern applications. DuploCloud supports Memcached, Redis, and Valkey ElastiCache instances.

hashtag
Creating a Memcached ElastiCache Instance

  1. In the DuploCloud Portal, navigate to Cloud Services -> Database.

  2. Select the ElastiCache tab and click Add. The Create a ElastiCache page displays.

  3. Enter a database Name.

  4. Specify the number of Replicas.

  5. In the Type list box, select Memcached.

  6. Select the Memcached Version.

  7. Select the node size in the Size list box.

  8. Click Create. The Memcached ElastiCache instance is created.

circle-info

Pass the cache endpoint to your application through the via the AWS Service.

hashtag
Creating a Redis or Valkey ElastiCache Instance

  1. In the DuploCloud Portal, navigate to Cloud Services -> Database.

  2. Select the ElastiCache tab and click Add. The Create an ElastiCache page displays.

  1. Enter a database Name.

  2. Specify the number of Replicas.

  3. Optionally, enable Automatic Failover: if the primary node in the cluster fails, one of the read replicas is automatically promoted. This setting requires at least two replicas.

  4. Optionally, enable Cluster Mode and specify the No Of Shards.

  1. Optionally, configure snapshots for backup:

  1. Optionally, click the CloudWatch link above the Log Delivery Configuration field to enable exporting engine logs and slow logs to Amazon CloudWatch Logs.

    • Complete the fields to configure CloudWatch:

      • Log Format

  1. Click Create. The Redis or Valkey database instance is created.

hashtag
Updating Snapshot Retention Limit

After a Redis or Valkey ElastiCache instance is created, most settings cannot be changed without deleting and recreating the instance. However, you can update the Snapshot Retention Limit at any time.

circle-exclamation

This setting is not available for Memcached. It applies only to Redis and Valkey instances, which support snapshot backups.

To update the Snapshot Retention Limit:

  1. Navigate to Cloud Services -> Database.

  2. Select the ElastiCache tab.

  3. Click on the name of the ElastiCache instance in the NAME column.

  4. Click Actions, and select Update Snapshot Retention Limit. The Update Snapshot Retention Limit

hashtag
Creating an ElastiCache Global Datastore

DuploCloud supports ElastiCache Global Datastores, which allow you to replicate a Redis cluster across AWS regions.

hashtag
Creating a Global Datastore

When you create a Global Datastore in DuploCloud, a primary Redis cluster, in the current Tenant, and a secondary cluster in a different region are created automatically as part of the process. You can then add additional secondary clusters in other regions as necessary.

  1. Navigate to to Cloud Services → Database → ElastiCache → Global Datastores.

  2. Click Add. The Create a Global Datastore pane displays.

  3. Complete the fields, as required for your configuration:

  1. Click Create to provision the ElastiCache Global Datastore.

hashtag
Adding Regional Clusters

After creating a Global Datastore, you can add secondary clusters (regional clusters) to replicate the primary Redis cluster across other AWS regions.

  1. Navigate to Cloud Services → Databases → ElastiCache → Global Datastores.

  2. Select the Regional Clusters tab.

  3. Click Add. The Add Secondary Cluster pane displays.

  1. Click Create to provision the secondary cluster.

circle-info

Each regional cluster added becomes a read replica of the primary Redis cluster. You can retrieve the primary or secondary cluster endpoint directly from the Redis Cluster tab to connect your application.

hashtag
Viewing Cluster Details

To view cluster details, including connection endpoints for a Global Datastore:

  1. Navigate to Cloud Services → Database → ElastiCache → Global Datastores.

  2. Select the name of the Global Datastore.

  3. Select the Regional Clusters tab. A list of clusters in the Global Datastore displays.

  4. Click the name of the cluster you want to view details for.

circle-info

Each cluster provides a single endpoint. The primary endpoint handles write operations, and the secondary endpoint handles read operations.

hashtag
Removing Clusters

To remove a cluster from a Global Datastore:

  1. Navigate to Cloud Services → Database → ElastiCache → Global Datastores.

  2. Select the name of the Global Datastore.

  3. Select the Regional Clusters tab

  4. Click the menu icon () in the row of the cluster you want to remove.

circle-exclamation

Important:

  • Secondary clusters must be removed before the primary cluster.

  • Once all secondary clusters are removed, the primary cluster can be removed.

hashtag
Troubleshooting Redis Connection Issues in AWS

When a Redis instance in an AWS environment is experiencing connection issues, ensure the Security Group (SG) configuration allows VPN traffic to port 6379. Then, using the nc command, verify the Redis instance's accessibility.

If you encounter local DNS resolution problems, consider changing your DNS provider or connecting directly using the Redis instance's IP address, which can be obtained via the dig command.

For persistent DNS issues, resetting your router or using external DNS query tools may help. If other troubleshooting steps fail, exploring can offer additional insights.

  • In the Type field, select Redis or Valkey.

  • In the Size list box, select the node size.

  • Optionally, complete the following fields:

  • Log Type
  • Log Group

  • Click Add Config. The configuration is added to the Log Delivery Configuration field.

  • pane displays.
    Update Snapshot Retention Limit pane
  • Select the desired Snapshot Retention Limit (Days) (between 1 and 35).

  • Click Update to save your changes.

  • Select the parameter group name for log delivery.

    Replicas

    Enter the number of replicas.

    No of Shards

    Specify the number of shards for the cluster.

    KMS (Optional)

    Select a KMS key to enable server-side encryption for the Global Datastore.

    Encryption in Transit

    Enable or disable in-transit encryption.

    • When enabled, enter the password clients will use to authenticate to the cluster in the Auth Token (Optional) field.

    Secondary Cluster KMS

    Select a KMS key to enable server-side encryption for any secondary clusters you add.

    Snapshot Retention Limit

    Enter retention period in days.

    Snapshot Window Start Time

    Enter the start time for the snapshot window.

    Snapshot Window Duration in Hours

    Enter the duration of the snapshot window in hours.

    Complete the following fields:

    Use the tabs to explore cluster details:

    Select Remove.

    Any removed cluster becomes a standalone cluster.

    Redis Version or Valkey Version

    Select the version number of the cache engine to be used. If not set, defaults to the latest version.

    Parameter Group Name

    Specify the name of the parameter group to associate with this cache cluster.

    KMS

    Select the KMS key.

    Encryption At Transit

    Select if Encryption at Transit is needed.

    Snapshot Name

    Select the snapshot/backup you want to use for creating Redis/Valkey.

    Snapshot ARNs

    Specify the ARN of a Redis RDB snapshot file stored in Amazon S3. Example: arn:aws:s3:::s3-backup-foldername/backupobject.rdb

    Snapshot Retention Limit

    Specify retention limit in days (1 to 35 days).

    Snapshot Window Start Time

    Select the time when your automated snapshot process will begin.

    Snapshot Window Duration in hours

    Specify the length of time allowed for taking the snapshots automatically.

    Name

    Enter a unique name for the datastore. We recommend using the Tenant name as a prefix.

    Redis Version

    Select the Redis version to deploy.

    Size

    Select a node size. Only Large or larger nodes are supported, and burstable types (t-class) are not allowed.

    Global Replication Group

    Enter a name for the replication group.

    Global Replication Group Description

    Optionally, enter a description for the replication group.

    Secondary Cluster Region

    Select the Tenant/region where you want the secondary cluster to reside.

    Log Delivery Configuration

    Configure a log destination to capture Redis logs for monitoring and troubleshooting.

    Name

    Enter a unique name for the secondary cluster.

    Description

    Optionally, enter a description for the cluster.

    Tenant

    Select the Tenant that will own this secondary cluster.

    KMS (Optional)

    If a KMS key was selected when creating the Global Datastore, select the same KMS key to enable server-side encryption for the secondary cluster.

    Auth Token (Optional)

    If a KMS key was selected when creating the Global Datastore, enter the authentication token for client connections.

    Redis Cluster

    Displays cluster details, including the endpoint.

    Details

    Shows a JSON representation of the cluster configuration and status.

    Alerts

    Displays any alerts related to the cluster.

    Snapshots

    Lists available snapshots and backup information for the cluster.

    Environment Variables
    AWS network interfacesarrow-up-right
    The Create an ElastiCache page in the DuploCloud Portal
    The Create an ElastiCache page in the DuploCloud Portal
    The Snapshot fields on the Create an ElastiCache pane
    The Add CloudWatch Logs: Log Delivery Configuration pane
    Create a Global Datastore pane
    Add Secondary Cluster pane
    Cluster detail page with Redis Cluster, Details, Alerts, and Snapshots tabs.

    Parameter Group Name