Amazon ElastiCache is a fully managed in-memory data store and cache service by
Amazon Web Services (AWS). The service improves the performance of web applications by retrieving information from managed
in-memory caches, instead of relying entirely on slower disk-based databases. ElastiCache supports two open-source in-memory caching engines:
Memcached
Memcached (pronounced variously ''mem-cash-dee'' or ''mem-cashed'') is a general-purpose distributed memory-caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of t ...
and
Redis
Redis (; Remote Dictionary Server) is an in-memory data structure store, used as a distributed, in-memory key–value database, cache and message broker, with optional durability. Redis supports different kinds of abstract data structures, su ...
(also called "ElastiCache for Redis").
As a
web service running in the
computing cloud
Cloud computing is the on-demand availability of computer system resources, especially data storage ( cloud storage) and computing power, without direct active management by the user. Large clouds often have functions distributed over mul ...
, Amazon ElastiCache is designed to simplify the setup, operation, and scaling of memcached and Redis deployments. Complex administration processes like patching software, backing up and restoring data sets and dynamically adding or removing capabilities are managed automatically. Scaling ElastiCache resources can be performed by a single
API
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
call.
Amazon ElastiCache was first released on August 22, 2011, supporting memcached. This was followed by support for reserved instances on April 5, 2012 and Redis on September 4, 2013.
Uses
As a managed database service with multiple supported engines, Amazon ElastiCache has a wide range of uses, including
Performance acceleration
Database limitations are often a bottleneck for application performance. By placing Amazon ElastiCache between an
application and its database
tier, database operations can be accelerated.
Cost reduction
Using ElastiCache for database performance acceleration can significantly reduce the infrastructure needed to support the database. In many cases, the cost savings outweigh the cache costs.
Expedia
Expedia Inc. is an online travel agency owned by Expedia Group, an American online travel shopping company based in Seattle. The website and mobile app can be used to book airline tickets, hotel reservations, car rentals, cruise ships, and vacat ...
was able to use ElastiCache to reduce provisioned DynamoDB capacity by 90%, reducing total database cost by 6x.
Processing time series data
Using the Redis engine, ElastiCache can rapidly process
time-series
In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Exa ...
data, quickly selecting newest or oldest records or events within range of a point-in-time.
Leaderboards
Leaderboards are an effective way to show a user quickly where they currently stand within a gamified system. For systems with large numbers of gamers, calculating and publishing player ranks can be challenging. Using Amazon ElastiCache with the Redis engine can enable high-speed at scale for leaderboards.
Rate limitation
Some APIs only allow a limited number of requests per time period. Amazon ElastiCache for Redis engine can use incremental counters and other tools to throttle API access to meet restrictions.
Atomic counter
Programs can use incremental
counters to limit allowed quantities, such as the maximum number of students enrolled in a course or ensuring a game has at least 2 but not more than 8 players. Using counters can create a
race condition
A race condition or race hazard is the condition of an electronics, software, or other system where the system's substantive behavior is dependent on the sequence or timing of other uncontrollable events. It becomes a bug when one or more of t ...
where an operation is allowed because a counter was not updated promptly. Using the ElastiCache for Redis atomic counter functions, where a single operation both checks and increments the counter's value, prevents race conditions.
Chat rooms and message boards
ElastiCache for Redis supports
publish-subscribe patterns, which enable the creation of
chat rooms
The term chat room, or chatroom (and sometimes group chat; abbreviated as GC), is primarily used to describe any form of synchronous conferencing, occasionally even asynchronous conferencing. The term can thus mean any technology, ranging from ...
and message boards where messages are automatically distributed to interested users.
Deployment options
Amazon ElastiCache can use on-demand cache nodes or reserved cache nodes.
On-demand nodes provide cache capacity by the hour, with resources in the AWS cloud assigned when a cache node is provisioned. An on-demand node can be removed from service by its owner at any time. Each month, the owner will be billed for the hours used.
Reserved nodes require a 1-year or 3-year commitment, which dedicates cache resources to the owner. The hourly cost of reserved nodes is significantly lower than the hourly cost of on-demand nodes.
Performance
An efficient
cache
Cache, caching, or caché may refer to:
Places United States
* Cache, Idaho, an unincorporated community
* Cache, Illinois, an unincorporated community
* Cache, Oklahoma, a city in Comanche County
* Cache, Utah, Cache County, Utah
* Cache County ...
can significantly increase application's performance and user navigation speed.
Amazon CloudWatch
Amazon Elastic Compute Cloud (EC2) is a part of Amazon.com's cloud-computing platform, Amazon Web Services (AWS), that allows users to rent virtual computers on which to run their own computer applications. EC2 encourages scalable deployment of ...
exposes ElastiCache performance metrics that can be tracked.
Key performance metrics
* Client metrics (measure the volume of client connections and requests): Number of current client connections to the cache, Get and Set commands received by the cache
* Cache performance: Hits, misses, Replication Lag,
Latency
* Memory metrics: Memory usage, Evictions, Amount of free memory available on the host, Swap Usage, Memory fragmentation ratio
* Other host-level metrics:
CPU utilization, Number of bytes read from the network by the host, Number of bytes written to the network by the host
Metric collection
Many ElastiCache metrics can be collected from AWS via
CloudWatch or directly from the cache engine, whether Redis or Memcached, with a monitoring tool integrating with it:
* Using th
AWS Management ConsoleUsing the online management console is the simplest way to monitor ElastiCache with CloudWatch. It allows to set up basic automated alerts and to get a visual picture of recent changes in individual metrics.
* CloudWatch
Command Line Interface
A command-line interpreter or command-line processor uses a command-line interface (CLI) to receive commands from a user in the form of lines of text. This provides a means of setting parameters for the environment, invoking executables and pro ...
Metrics related to ElastiCache can also be retrieved using command lines. It can be used for spot checks and ad hoc investigations.
* Monitoring tool integrated with CloudWatch
The third way to collect ElastiCache metrics is via a dedicated monitoring tool integrating with Amazon CloudWatch.
Notable customers
Users of Amazon ElastiCache include
Airbnb
Airbnb, Inc. ( ), based in San Francisco, California, operates an online marketplace focused on short-term homestays and experiences. The company acts as a broker and charges a commission from each booking. The company was founded in 2008 b ...
,
Expedia
Expedia Inc. is an online travel agency owned by Expedia Group, an American online travel shopping company based in Seattle. The website and mobile app can be used to book airline tickets, hotel reservations, car rentals, cruise ships, and vacat ...
,
Zynga
Zynga Inc. () is an American developer running social video game services. It was founded in April 2007, with headquarters in San Mateo, California. The company primarily focuses on mobile and social networking platforms. Zynga states its missio ...
,
FanDuel
FanDuel Group is an American gambling company that offers sportsbook, daily fantasy sports, horse racing, and online casino. The company operates sportsbooks in a number of states including New Jersey, Pennsylvania, Indiana and West Virginia, as ...
, and
Mapbox
Mapbox is an American provider of custom online maps for websites and applications such as Foursquare, Lonely Planet, the ''Financial Times'', The Weather Channel, Instacart Inc. and Snapchat. Since 2010, it has rapidly expanded the niche of cus ...
Limitations
As an AWS service, ElastiCache is designed to be accessed exclusively from within AWS, though it is possible to connect the service to applications and databases that are not hosted by AWS.
Alternatives
Other vendors provide cloud data cache services comparable to Amazon ElastiCache, includin
Azure Cache for Redis Redis Ltd (company behind open source Redis and Redis Enterprise),
Redis To Go
Redis (; Remote Dictionary Server) is an in-memory data structure store, used as a distributed, in-memory key–value database, cache and message broker, with optional durability. Redis supports different kinds of abstract data structures, suc ...
,
IBM Compose,
Oracle Application Container Cloud Service, and
Rackspace ObjectRocket.
References
External links
*
{{Amazon
Web Services
Cloud computing providers
Cloud platforms
2006 software
Web hosting
ElastiCache
Cloud infrastructure
Cloud storage
Distributed data stores
Structured storage
NoSQL products
Cloud databases