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
- Your app queries ElastiCache first.
- If data is cached, it’s returned instantly.
- If not, the app fetches from the database and
optionally stores the result in ElastiCache.
- 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
- Go to the ElastiCache Console.
- Choose Redis or Memcached.
- 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
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 ZonesAccess 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
No comments:
Post a Comment