What is Amazon ElastiCache?
Amazon ElastiCache is an in-memory data store that provides microsecond latency to power internet-scale, real-time applications. ElastiCache is compatible with Valkey and Redis OSS APIs and works with clients and data formats to store your data, which means your applications work seamlessly without any code changes. ElastiCache combines the speed, simplicity, and versatility of Valkey and Redis OSS with the manageability, security, and scalability from Amazon to power the most demanding real-time applications in Gaming, Ad-Tech, E-Commerce, Healthcare, Financial Services, and IoT.
Benefits
Extreme performance
ElastiCache is an in-memory data store ideal for applications requiring microsecond latency. In comparison to disk-based databases where most operations need a round trip to disk, ElastiCache manages data in-memory that is an order of magnitude faster than disks. The average read or write operations take less than a few microseconds across hundreds of millions of operations per second within a cluster. R7g.4xlarge nodes or larger deliver over 1 million requests per second per node or 500 million request per second per cluster.
Secure
ElastiCache has encryption in transit, at rest (including customer managed CMK stored in AWS KMS), and Valkey and Redis OSS AUTH for secure internode communications to help keep sensitive data such as personally identifiable information (PII) safe. It offers Role-Based Access Control (RBAC) so you can create and manage users and user groups, enables connection using AWS IAM identities, and supports Amazon VPC to isolate your cluster to your selected IP ranges. We continuously monitor for security vulnerabilities to keep your environment secure. ElastiCache is PCI compliant, HIPAA eligible, and FedRAMP authorized.
Open Source Compatibility
Valkey and Redis OSS are in-memory data stores for use as a database, cache, message broker, queue, session store, and leaderboard. ElastiCache maintains compatibility with Valkey and Redis OSS data formats, APIs, and clients. You can migrate your self-managed Valkey or Redis OSS workloads to ElastiCache without any code change.
Highly Available and Reliable
ElastiCache supports both cluster and non-cluster modes. It provides high availability via read replicas and support for automatic failover by detecting primary node failures and promoting a replica to be primary with minimal impact. It has enhanced failover logic to allow for automatic failover in cases when majority of the primary nodes for cluster mode are unavailable. On ElastiCache for Valkey or ElastiCache versions 5.0.5 onwards for Redis OSS, auto-failover enabled clusters provide online configuration changes for all planned operations.
Fully Managed and Proven Operational Excellence
ElastiCache supports both cluster and non-cluster modes. It provides high availability via read replicas and support for automatic failover by detecting primary node failures and promoting a replica to be primary with minimal impact. It has enhanced failover logic to allow for automatic failover in cases when majority of the primary nodes for cluster mode are unavailable. On ElastiCache for Valkey or ElastiCache versions 5.0.5 onwards for Redis OSS, auto-failover enabled clusters provide online configuration changes for all planned operations.
Easily Scalable
With ElastiCache, you data can scale as your application grows - up to 310 TiB of in-memory data or 982 TiB when using clusters with data tiering. You can scale your cluster environment up to 500 nodes and 500 shards. It is designed to support online cluster resizing to scale-out and scale-in your clusters without downtime amidst changing demands. You can scale read capacity up to five read replicas across multiple Availability Zones. To scale write capacity, it supports cluster mode enabling you to partition your write traffic across multiple primaries.
Use cases
Caching
Amazon ElastiCache is a great choice for implementing a highly available, distributed, and secure in-memory cache to decrease access latency, increase throughput, and ease the load off your relational or NoSQL databases and applications. ElastiCache can serve frequently requested items at microsecond latency, and enables you to easily scale for higher loads without growing the costlier backend databases. Database query results caching, persistent session caching, and full-page caching are all popular examples of caching with ElastiCache.
Chat and Messaging
Amazon ElastiCaches supports the PUB/SUB standard with pattern matching. This allows ElastiCache to support high performance chat rooms, real-time comment streams, and server intercommunication. You can also use PUB/SUB to trigger actions based on published events.
Gaming Leaderboards
Real-time gaming leaderboards are easy to create with Amazon ElastiCache. Simply use Valkey or Redis OSS sorted set data structure, which provides uniqueness of elements while maintaining the list sorted by their scores. Creating a real-time ranked list is as simple as updating a user's score each time it changes. You can also use sorted sets to handle time series data by using timestamps as the score.
Geospatial
Amazon ElastiCache offers purpose-built in-memory data structures and operators to manage real-time geospatial data at scale and speed. You can use ElastiCache to add location-based features such as drive time, drive distance, and points of interests to your applications. Learn how to build a geospatial application with ElastiCache.
Machine Learning
Amazon ElastiCache gives you an in-memory data store to build and deploy machine learning models quickly. Use ElastiCache for use cases such as fraud detection in gaming and financial services, real-time bidding in ad-tech, and matchmaking in dating and ride sharing to process live data and make decisions within tens of milliseconds. Learn how Coffee Meets Bagel uses ElastiCache for real-time machine learning-based dating recommendations.
Media Streaming
Amazon ElastiCache offers an in-memory data store to power live streaming use cases. ElastiCache can be used to store metadata for user profile and viewing history, authentication information/tokens for millions of users, and manifest files to enable CDNs to stream videos to millions of mobile and desktop users at a time.
More use cases
Real-time Analytics
Use Amazon ElastiCache with streaming solutions such as Apache Kafka and Amazon Kinesis as an in-memory data store to ingest, process, and analyze real-time data with sub-millisecond latency.
Queues
Amazon ElastiCache offers List data structure making it easy to implement a lightweight, persistent queue. Lists offer atomic operations as well as blocking capabilities, making them suitable for a variety of applications that require a reliable message broker or a circular list.
Session Store
Amazon ElastiCache is highly suited as a session store to manage session information such as user authentication tokens, session state, and more. Simply use ElastiCache as a fast key-value store with appropriate TTL on session keys to manage your session information. Session management is commonly required for online applications, including games, e-commerce websites, and social media platforms.