Wednesday, June 4, 2025

Amazon ElastiCache.

 

Amazon ElastiCache is a fully managed, in-memory data store and cache service from AWS that supports two popular open-source engines: Redis and Memcached. It’s designed to improve application performance by retrieving data from a fast, low-latency, in-memory cache rather than slower disk-based databases.

 Key Benefits

Benefit

Description

Ultra-Fast Performance

Microsecond latency for read/write operations.

Scalability

Scale out with sharding (Redis) or by adding nodes.

High Availability

Support for Multi-AZ with automatic failover (Redis only).

Security

Integrated with VPC, encryption in transit/at rest, IAM, and security groups.

Managed Service

Patching, monitoring, backups, and node recovery handled by AWS.

 Supported Engines

Engine

Best For

Features

Redis

Advanced data structures, persistence, pub/sub, replication

Backup/restore, Multi-AZ, clustering

Memcached

Simpler cache use cases, horizontal scaling

In-memory key-value cache, multi-threaded

 Use Cases

  • Caching frequently accessed DB queries, session state, or objects
  • Leaderboards or real-time analytics
  • Message queues or pub/sub systems (Redis)
  • Gaming, ad tech, financial trading systems where latency matters

 How It Works

  1. Your app queries ElastiCache first.
  2. If data is cached, it’s returned instantly.
  3. If not, the app fetches from the database and optionally stores the result in ElastiCache.
  4. TTL (Time-To-Live) is set to expire old cache entries.

Scaling Options

  • Redis:
    • Clustering for partitioning and high availability.
    • Replication with failover for resilience.
  • Memcached:
    • Horizontal scaling by adding/removing nodes.
    • No replication or persistence.

 Security & Monitoring

  • IAM for access control (management layer)
  • VPC for network isolation
  • Amazon CloudWatch for performance monitoring
  • Encryption at rest/in transit (Redis only)

 twtech Example Architectures

  • Web App + RDS + Redis for database query caching
  • Lambda + API Gateway + Redis for session/state caching
  • Microservices + Redis for pub/sub or job queues

Quick Setup via Console

  1. Go to the ElastiCache Console.
  2. Choose Redis or Memcached.
  3. Select cluster mode and configuration (nodes, engine version).

Launch and connect using the endpoint URL.
Project: Hands-on

How twtech creates and use Amazon Elasticache

Search for aws service:

Get started with type: Redis OSS


Create Redis OSS cache

Cluster mode

Scale your cluster dynamically with no downtime.


Cluster info

Use the following options to configure the cluster

For more availability, Multi-AZ should to be: enabled

Or: Disenabled

Cache settings

Use the following options to configure the cluster.


Subnet group settings: create a new subnet group

Subnets are auto-selected, but twtech may decide to:  manage the subnets

For AZ placements, twtech may specify particular:  AZ,

Availability Zone placements

Use the following fields to configure placements for Availability Zones

For: Advanced settings

Access control: twtech uses this to specify who is allowed to access the Elasticache cluster or the path

Provides the ability to configure authenticating and authorizing access.

Or: disenable encryption in transit: the application will have access from the network


Or

No backups:

Maintenance

Configure maintenance settings for the cluster.


Configure for Logs management: 

Or:  disenabled logs management 

Tags

You can use tags to search and filter your clusters, or track your AWS costs.


Review and create

From: Creating

To: Available

Endpoints:

No comments:

Post a Comment

Kubernetes Clusters | Upstream Vs Downstream.

  The terms "upstream" and "downstream" in the context of Kubernetes clusters often refer to the direction of code fl...