CLOUD SERVICE · AWS

Amazon ElastiCache

Amazon ElastiCache is a fully managed in-memory caching service that helps improve the performance of web applications by allowing you to retrieve information from fast, managed, in-memory caches, instead of relying solely on slower disk-based databases.

Cloud Services Hub →
Arch_Amazon ElastiCache_64 imageIcon source: AWS

What is Amazon ElastiCache

Read the extensive description

Amazon ElastiCache is a fully managed caching service provided by Amazon Web Services (AWS) that offers seamless deployment, operation, and scaling of in-memory cache environments in the cloud. The service improves the performance of web applications by allowing them to retrieve information from a fast, managed, in-memory caching system, instead of relying solely on slower disk-based databases. 

ElastiCache supports three open-source in-memory caching engines: Valkey, Redis OSS, and Memcached. With Redis, ElastiCache provides a feature-rich platform, suitable for use cases such as primary datastore for lightweight transactions, session stores, gaming leaderboards, and pub/sub messaging systems. 

Redis is well-known for its support of complex data structures such as sorted sets and lists, as well as its ability to support high-performance, atomic operations. This makes it ideal for scenarios requiring complex queries or transactional capabilities. ElastiCache for Redis offers various features such as replication across Availability Zones for increased availability, automatic failover to a read replica in case of primary node failure, and data persistence. 

ElastiCache for Memcached, on the other hand, is designed for simplicity and is a great fit for straightforward caching scenarios that require a highly scalable, distributed memory object caching system. It is particularly effective at speeding up dynamic web applications by alleviating database load. 

Amazon ElastiCache is engineered to deliver sub-millisecond latency and high-throughput, which is essential for applications that require real-time access to information. It handles tasks like hardware provisioning, software patching, setup, configuration, and monitoring, which simplifies the management of in-memory cache environments. 

Besides performance, ElastiCache is also focused on security. It allows users to control access to their caches through AWS Identity and Access Management (IAM), supports encryption in-transit and at-rest for Redis, and is also compliant with HIPAA, PCI DSS, and other common compliance standards. 

ElastiCache Serverless for Valkey 9 or later supports either VPC or public endpoints. Public endpoints allow internet connections without a VPC and require IAM authentication and TLS for every connection.

Scalability is another significant advantage of using Amazon ElastiCache. Users can start with a small cache cluster and scale out to accommodate growing demands, with just a few clicks in the AWS Management Console or with a simple API call. This elasticity allows users to adapt to varying loads and traffic spikes without over-provisioning resources, which in turn can lead to cost-savings. 

ElastiCache offers serverless and node-based deployments. ElastiCache Serverless manages infrastructure and scales instantly with application demand without downtime during maintenance. Node-based deployments let you select node types and sizes for fine-grained control over configuration and resource allocation.

Node-based Valkey and Redis OSS deployments can use data tiering on R6gd nodes, combining memory with NVMe SSD storage for less frequently accessed data. Accessing data on SSD adds latency; data tiering is not supported for Memcached.

Amazon ElastiCache integrates seamlessly with other AWS services, such as Amazon EC2 for compute resources, Amazon S3 for backups and persistent storage, and Amazon CloudWatch for monitoring and alerting. This tight integration with the AWS ecosystem allows developers to build and run applications with high performance, availability, and security, without the operational complexity of managing a caching layer on their own. 

ElastiCache can also run on AWS Outposts, using M5 and R5 family nodes. ElastiCache Serverless is not available on Outposts.

For node-based Valkey clusters outside AWS Outposts, standard monitoring publishes classic CloudWatch metrics and core OpenTelemetry metrics every 60 seconds. Detailed monitoring lets you select OpenTelemetry metrics from the full set and publish them every 15 seconds.

Overall, Amazon ElastiCache is a powerful solution for developers looking to enhance the performance of their applications through efficient in-memory caching, without the hassle of managing the underlying infrastructure. Its flexibility, ease of use, and integration with AWS services make it a strong choice for enterprises and developers looking to build scalable, high-performance web applications.

Key Amazon ElastiCache Features

Amazon ElastiCache offers a fully managed in-memory caching service with high performance, scalability, high availability, security features, and seamless integration with AWS services, ensuring ease of use and cost-effectiveness.

In-Memory Caching

Amazon ElastiCache offers fully managed in-memory data stores, support for Valkey, Redis OSS, and Memcached, allowing for high-performance, scalable, and cost-effective caching solutions.

High Performance

ElastiCache is designed for high throughput and low latency workloads, providing fast access to datasets by storing them in-memory, leading to improved application performance.

Scalability

With the ability to automatically scale the cache cluster horizontally and vertically, ElastiCache ensures that your caching layer can grow with your application's demands.

High Availability

The service supports automatic failover, multi-AZ deployments for Redis, and replication across AWS Availability Zones to ensure that your caching layer is both resilient and reliable.

Secure

ElastiCache includes security features such as encryption in-transit and at-rest, VPC support, and compliance with various standards, protecting sensitive data and ensuring privacy.

Fully Managed Service

Amazon ElastiCache takes care of operational complexity, such as hardware provisioning, setup and configuration, monitoring, failure recovery, and software patching.

Cost-Effective

With on-demand pricing and reserved instance options, ElastiCache allows for cost savings and efficient resource utilization, adapting to your usage patterns.

Integrated with AWS Services

ElastiCache seamlessly integrates with other AWS services like Amazon CloudWatch for metrics, AWS CloudTrail for audit and compliance, and Amazon RDS for database layer caching.

Ease of Use

Through the AWS Management Console, CLI, and SDKs, ElastiCache is easy to deploy, manage, and scale, streamlining operations for developers and system administrators.

Amazon ElastiCache Use Cases

Amazon ElastiCache is widely used for caching frequently accessed data, serving as a session store, supporting real-time analytics and leaderboards, and reducing database load by functioning as a database caching layer.

Caching Frequently Accessed Data

Amazon ElastiCache can be utilized to cache data that is frequently requested by users or applications. By keeping this information in memory, it allows for rapid data retrieval, drastically reducing latency and improving the performance of web applications that rely on this type of data.

Session Store

ElastiCache serves as an extremely efficient session store with its in-memory data storage capabilities. It can handle large volumes of sessions for web applications, providing quick access and scalability while ensuring session data is kept fast and responsive for the user's experience.

Real-Time Analytics

The service is perfect for scenarios involving real-time analytics. It can quickly process and analyze large volumes of data in real-time, enabling applications to offer insights and response capabilities with minimal delay, suited for use cases such as recommendation engines or fraud detection.

Leaderboards and Counting

Amazon ElastiCache excels at managing rapidly changing data like game leaderboards or hit counters. It can update and serve this data at high speed, essential for gaming platforms or websites that require real-time ranking or counting features.

Database Caching

To enhance the performance of backend databases, ElastiCache can be deployed as a front-end database caching layer. This helps in reducing the load on the databases by serving read-intensive queries from the cache, effectively minimizing the database read throughput and lowering latency.

Amazon ElastiCache pricing models

Amazon ElastiCache offers on-demand pricing based on hourly rates, reserved instance pricing for one or three-year commitments with discounted rates, and data transfer pricing that may apply for outbound data transfers.

Backup Storage Pricing

Backup storage costs $0.085 per GiB per month in all AWS Regions.

Data Transfer Pricing

In-Region transfer is free for Serverless caches with VPC endpoints. For Serverless public endpoints and cross-AZ node-based access, the cache side is free, but application-side transfer costs $0.01 per GB. Across Regions, standard rates may apply to application traffic sent to a cache; application traffic received from the cache is free. Cache-side cross-Region application traffic is free for VPC-endpoint Serverless caches and node-based clusters, while public-endpoint caches incur standard rates for outgoing traffic. Global Datastore replication incurs charges for traffic leaving the primary Region. Standard internet egress rates apply, with 100 GB free monthly aggregated across AWS services and Regions except China and GovCloud.

Database Savings Plans

Database Savings Plans offer savings in exchange for a commitment to a specific amount of eligible usage, measured in dollars per hour, over a one-year term.

Detailed Monitoring Pricing

ElastiCache does not charge extra for detailed monitoring, but CloudWatch bills selected metrics as OpenTelemetry metrics by ingested data volume. CloudWatch also charges for alarms and PromQL queries through its API or other tools, including those on core metrics; CloudWatch console queries and dashboards are free.

Durability Pricing

For node-based ElastiCache clusters, synchronous durability writes cost 18% above the standard node-hour price. Asynchronous durability writes have no additional charge beyond standard node-hour pricing.

Extended Support Pricing

For provisioned ElastiCache for Redis OSS instances, Extended Support carries an 80% premium in years one and two and a 160% premium in year three. Pricing also depends on the AWS Region and calendar date.

On-Demand Pricing

Users pay an hourly rate for the ElastiCache node size and type they use, with no long-term commitments or up-front fees. Prices vary based on the node type and region, and charges accrue per hour for each node that is running.

Reserved Instance Pricing

Customers can reserve ElastiCache nodes for a one or three-year term and enjoy a significant discount compared to the on-demand price. The reservation involves an upfront payment, with options for partial or no upfront payment, and the hourly rate is lower than the on-demand rate.

Serverless Pricing

ElastiCache Serverless charges for data stored in GB-hours and requests measured in ElastiCache Processing Units (ECPUs), which account for CPU time and data transferred. Minimum metered storage is 100 MB per Valkey cache and 1 GB per Memcached or Redis OSS cache.

Services Amazon ElastiCache integrates with

Amazon EC2 image Amazon EC2

Amazon ElastiCache nodes are deployed within Amazon EC2 instances, and you can seamlessly connect your EC2 instances to your ElastiCache clusters for low-latency data access.

Open Amazon EC2 →
AWS CloudFormation image AWS CloudFormation

AWS CloudFormation allows you to define and provision ElastiCache resources using templates, enabling infrastructure as code and repeatable deployments.

Open AWS CloudFormation →
Amazon CloudWatch image Amazon CloudWatch

Amazon CloudWatch provides detailed monitoring of ElastiCache performance metrics, helping you to set alarms and automated actions based on specified thresholds.

Open Amazon CloudWatch →
Virtual private cloud VPC_32 image Amazon VPC

Amazon ElastiCache allows you to launch clusters within your Amazon VPC, enabling you to isolate your cluster within a private network and extend your on-premises network to the cloud.

Open Amazon VPC →
AWS Identity and Access Management image AWS Identity and Access Management (IAM)

AWS IAM is used to manage access and permissions for ElastiCache resources, allowing you to control who can create, modify, or delete your ElastiCache resources.

Open AWS Identity and Access Management (IAM) →
AWS Lambda image AWS Lambda

AWS Lambda can be used to run code in response to ElastiCache events, such as cache misses or updates, enabling serverless application architectures.

Open AWS Lambda →

Concepts related to Amazon ElastiCache