Database | Amazon ElastiCache Flashcards
What is Amazon ElastiCache?
The Basics
Amazon ElastiCache | Database
Amazon ElastiCache is a web service that makes it easy to deploy and run Memcached or Redis protocol-compliant server nodes in the cloud. Amazon ElastiCache improves the performance of web applications by allowing you to retrieve information from a fast, managed, in-memory system, instead of relying entirely on slower disk-based databases. The service simplifies and offloads the management, monitoring and operation of in-memory environments, enabling your engineering resources to focus on developing applications. Using Amazon ElastiCache, you can not only improve load and response times to user actions and queries, but also reduce the cost associated with scaling web applications.
Amazon ElastiCache automates common administrative tasks required to operate a distributed in-memory key-value environment. Using Amazon ElastiCache, you can add a caching or in-memory layer to your application architecture in a matter of minutes via a few clicks of the AWS Management Console. Once a cluster is provisioned, Amazon ElastiCache automatically detects and replaces failed nodes, providing a resilient system that mitigates the risk of overloaded databases, which slow website and application load times. Through integration with Amazon CloudWatch monitoring, Amazon ElastiCache provides enhanced visibility into key performance metrics associated with your nodes. Amazon ElastiCache is protocol-compliant with Memcached and Redis, so code, applications, and popular tools that you use today with your existing Memcached or Redis environments will work seamlessly with the service. With the support for clustered configuration in Amazon ElastiCache, you get the benefits of fast, scalable and easy to use managed service that can meet the needs of your most demanding applications. As with all Amazon Web Services, there are no up-front investments required, and you pay only for the resources you use.
What is in-memory caching and how does it help my applications?
The Basics
Amazon ElastiCache | Database
The in-memory caching provided by Amazon ElastiCache can be used to significantly improve latency and throughput for many read-heavy application workloads (such as social networking, gaming, media sharing and Q&A portals) or compute-intensive workloads (such as a recommendation engine). In-memory caching improves application performance by storing critical pieces of data in memory for low-latency access. Cached information may include the results of I/O-intensive database queries or the results of computationally-intensive calculations.
Can I use Amazon ElastiCache for use cases other than caching?
The Basics
Amazon ElastiCache | Database
Yes. ElastiCache for Redis can be used as a primary in-memory key-value data store, providing fast, sub millisecond data performance, high availability and scalability up to 15 nodes plus up to 5 read replicas, each of up to 6.1 TiB of in-memory data. See here for other use cases, such as leaderboards, rate limiting, queues, and chat.
Can I use Amazon ElastiCache through AWS CloudFormation?
The Basics
Amazon ElastiCache | Database
AWS CloudFormation simplifies provisioning and management by providing AWS CloudFormation templates for quick and reliable provisioning of the services or applications. AWS CloudFormation provides comprehensive support for Amazon ElastiCache by providing templates to create cluster (both MemCached and Redis) and Replication Groups. The templates are up to date with the latest ElastiCache Redis announcement for clustered Redis configuration and provide flexibility and ease of use to Amazon ElastiCache customers.
What does Amazon ElastiCache manage on my behalf?
The Basics
Amazon ElastiCache | Database
Amazon ElastiCache manages the work involved in setting up a distributed in-memory environment, from provisioning the server resources you request to installing the software. Once your environment is up and running, the service automates common administrative tasks such as failure detection and recovery, and software patching. Amazon ElastiCache provides detailed monitoring metrics associated with your nodes, enabling you to diagnose and react to issues very quickly. For example, you can set up thresholds and receive alarms if one of your nodes is overloaded with requests.
What are Amazon ElastiCache nodes, shards and clusters?
The Basics
Amazon ElastiCache | Database
A node is the smallest building block of an Amazon ElastiCache deployment. It is a fixed-size chunk of secure, network-attached RAM. Each node runs an instance of the Memcached or Redis protocol-compliant service and has its own DNS name and port. Multiple types of nodes are supported, each with varying amount of associated memory. A Redis shard is a subset of the cluster’s keyspace, that can include a primary node and zero or more read-replicas. For more details on Redis deployments see the Redis section below. The shards add up to form a cluster.
Which engines does Amazon ElastiCache support?
The Basics
Amazon ElastiCache | Database
Amazon ElastiCache for Memcached currently supports Memcached 1.4.5, 1.4.14, 1.4.24, 1.4.33 and 1.4.34
Amazon ElastiCache for Redis currently supports Redis 2.8.21, 2.8.22, 2.8.23, 2.8.24, 3.2.4, 3.2.6 and 3.2.10.
How do I get started with Amazon ElastiCache?
The Basics
Amazon ElastiCache | Database
If you are not already signed up for Amazon ElastiCache, you can click the “Sign Up Now” button on the Amazon ElastiCache detail page and complete the sign-up process. You must have an Amazon Web Services account; if you do not already have one, you will be prompted to create one when you begin the Amazon ElastiCache sign-up process. After you are signed up for ElastiCache, please refer to the Amazon ElastiCache documentation, which includes our Getting Started Guide.
Once you have familiarized yourself with Amazon ElastiCache, you can launch a cluster within minutes by using the AWS Management Console or Amazon ElastiCache APIs.
How do I create a cluster?
The Basics
Amazon ElastiCache | Database
Clusters are simple to create, using the AWS Management Console, Amazon ElastiCache APIs, or Command Line Tools. To launch a cluster using the AWS Management Console, click on the “Create” button in either the “Memcached” or “Redis” tab. From there, all you need to specify is your Cluster Identifier, Node Type, and Number of Nodes to create a cluster with the amount of memory you require. Alternatively, you can create your cluster using the CreateCacheCluster API or elasticache -create-cache-cluster command. If you do not specify an Availability Zone when creating a cluster, AWS will place it automatically based upon your memory requirements and available capacity.
What Node Types can I select?
The Basics
Amazon ElastiCache | Database
Amazon ElastiCache supports Nodes of the following types:
Current Generation Nodes:
cache. m3.medium: 2.78 GB
cache. m3.large: 6.05 GB
cache. m3.xlarge: 13.3 GB
cache. m3.2xlarge: 27.9 GB
cache. m4.large: 6.42 GB
cache. m4.xlarge: 14.28 GB
cache. m4.2xlarge: 29.7 GB
cache. m4.4xlarge: 60.78 GB
cache. m4.10xlarge: 154.64 GB
cache. r3.large: 13.5 GB
cache. r3.xlarge: 28.4 GB
cache. r3.2xlarge: 58.2 GB
cache. r3.4xlarge: 118 GB
cache. r3.8xlarge: 237 GB
cache. r4.large: 12.3 GB
cache. r4.xlarge: 25.05 GB
cache. r4.2xlarge: 50.47 GB
cache. r4.4xlarge: 101.38 GB
cache. r4.8xlarge: 203.26 GB
cache. r4.16xlarge: 407 GB
cache. t2.micro: 555 MB
cache. t2.small: 1.55 GB
cache. t2.medium: 3.22 GB
Previous Generation Nodes:
cache. m1.small: 1.3 GB
cache. m1.medium: 3.35 GB
cache. m1.large: 7.1 GB
cache. m1.xlarge: 14.6 GB
cache. m2.xlarge: 16.7 GB
cache. m2.2xlarge: 33.8 GB
cache. m2.4xlarge: 68 GB
cache. t1.micro: 213 MB
cache. c1.xlarge: 6.6 GB
Each Node Type above lists the memory available to Memcached or Redis after taking Amazon ElastiCache System Software overhead into account. The total amount of memory in a cluster is an integer multiple of the memory available in each shard. For example, a cluster consisting of ten shards of 6 GB each will provide 60 GB of total memory.
How do I access my nodes?
The Basics
Amazon ElastiCache | Database
Once your cluster is available, you can retrieve your node endpoints using the following steps on the AWS Management Console:
Navigate to the “Amazon ElastiCache” tab.
Click on the “(Number of) Nodes” link and navigate to the “Nodes” tab.
Click on the “Copy Node Endpoint(s)” button.
Alternatively, you can use the DescribeCacheClusters API to retrieve the Endpoint list.
You can then configure your Memcached or Redis client with this endpoint list and use your favorite programming language to add or delete data from your ElastiCache Nodes. In order to allow network requests to your nodes, you will need to authorize access. For a detailed explanation to get started, please refer to our Getting Started Guide.
What is a maintenance window? Will my nodes be available during software maintenance?
Billing
Amazon ElastiCache | Database
You can think of the Amazon ElastiCache maintenance window as an opportunity to control when software patching occurs, in the event either are requested or required. If a “maintenance” event is scheduled for a given week, it will be initiated and completed at some point during the 60 minute maintenance window you identify.
Your nodes could incur some downtime during your maintenance window if software patching is scheduled. Please refer to Engine Version Management for more details. Patching can be user requested - for example cache software upgrade, or determined as required (if we identify any security vulnerabilities in the system or caching software). Software patching occurs infrequently (typically once every few months) and should seldom require more than a fraction of your maintenance window. If you do not specify a preferred weekly maintenance window when creating your Cluster, a 60 minute default value is assigned. If you wish to modify when maintenance is performed on your behalf, you can do so by modifying your DB Instance in the AWS Management Console or by using the ModifyCacheCluster API. Each of your Clusters can have different preferred maintenance windows, if you so choose.
How will I be charged and billed for my use of Amazon ElastiCache?
Billing
Amazon ElastiCache | Database
You pay only for what you use and there is no minimum fee. Pricing is per Node-hour consumed for each Node Type. Partial Node-hours consumed are billed as full hours. There is no charge for data transfer between Amazon EC2 and Amazon ElastiCache within the same Availability Zone. While standard Amazon EC2 Regional Data Transfer charges apply when transferring data between an Amazon EC2 instance and an Amazon ElastiCache Node in different Availability Zones of the same Region, you are only charged for the Data Transfer in or out of the Amazon EC2 instance. There is no Amazon ElastiCache Data Transfer charge for traffic in or out of the Amazon ElastiCache Node itself. For more information, please visit the pricing page.
When does billing of my Amazon ElastiCache Nodes begin and end?
Billing
Amazon ElastiCache | Database
Billing commences for a node as soon as the node is available. Billing continues until the node is terminated, which would occur upon deletion.
What defines billable ElastiCache Node hours?
Billing
Amazon ElastiCache | Database
Node hours are billed for any time your nodes are running in an “Available” state. If you no longer wish to be charged for your node, you must terminate it to avoid being billed for additional node hours.
Do your prices include taxes?
Reserved Nodes
Amazon ElastiCache | Database
Except as otherwise noted, our prices are exclusive of applicable taxes and duties, including VAT and applicable sales tax. For customers with a Japanese billing address, use of AWS services is subject to Japanese Consumption Tax. Learn more.
What are Amazon ElastiCache Reserved Nodes?
Reserved Nodes
Amazon ElastiCache | Database
With Reserved Nodes, you can now make a one-time, up-front payment to create a one or three year reservation to run your node in a specific Region and receive a significant discount off of the ongoing hourly usage charge. There are three Reserved Node types (Light, Medium, and Heavy Utilization Reserved Nodes) that enable you to balance the amount you pay upfront with your effective hourly price.
How are Reserved Nodes different from On-Demand Nodes?
Reserved Nodes
Amazon ElastiCache | Database
Functionally, Reserved Nodes and On-Demand Nodes are exactly the same. The only difference is how your Node(s) are billed; with Reserved Nodes, you make a one-time up-front payment and receive a lower ongoing hourly usage rate (compared with On-Demand Nodes) for the duration of the term.