Database | Amazon ElastiCache for Memcached Flashcards

1
Q

What can I cache using Amazon ElastiCache for Memcached?

Features

Amazon ElastiCache for Memcached | Database

A

You can cache a variety of objects using the service, from the content in persistent data stores (such as Amazon RDS, DynamoDB, or self-managed databases hosted on EC2) to dynamically generated web pages (with Nginx for example), or transient session data that may not require a persistent backing store. You can also use it to implement high-frequency counters to deploy admission control in high volume web applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Can I use Amazon ElastiCache for Memcached with an AWS persistent data store such as Amazon RDS or Amazon DynamoDB?

Features

Amazon ElastiCache for Memcached | Database

A

Yes, Amazon ElastiCache is an ideal front-end for data stores like Amazon RDS or Amazon DynamoDB, providing a high-performance middle tier for applications with extremely high request rates and/or low latency requirements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

I use Memcached today. How do I migrate to Amazon ElastiCache?

Configuration and Scaling

Amazon ElastiCache for Memcached | Database

A

Amazon ElastiCache is protocol-compliant with Memcached. Therefore, you can use standard Memcached operations like get, set, incr and decr in exactly the same way as you would in your existing Memcached deployments. Amazon ElastiCache supports both the text and binary protocols. It also supports most of the standard stats results, which can also be viewed as graphs via CloudWatch. As a result, you can switch to using Amazon ElastiCache without recompiling or re-linking your applications - the libraries you use will continue to work. To configure the cache servers your application accesses, all you will need to do is to update your application’s Memcached config file to include the endpoints of the servers (nodes) we provision for you. You can simply use the “Copy Node Endpoints” option on the AWS Management Console or the “DescribeCacheClusters” API to get a list of the endpoints. As with any migration process, we recommend thorough testing of your new Amazon ElastiCache deployment before completing the cut over from your current solution.

Please note that Amazon ElastiCache currently allows access only from the Amazon EC2 network, so in order to use the service, you should have your application servers in Amazon EC2.

Amazon ElastiCache uses DNS entries to allow client applications to locate servers (nodes). The DNS name for a node remains constant, but the IP address of a node can change over time, for example, when nodes are auto replaced after a failure on a non-VPC installation. See this FAQ for recommendations to deal with node failures.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do I select an appropriate Node Type for my application?

Configuration and Scaling

Amazon ElastiCache for Memcached | Database

A

Though there is no precise answer for this question, with Amazon ElastiCache, you don’t need to worry about getting the number of nodes exactly right, as you can very easily add or remove nodes later. The following two inter-related aspects could be considered for the choice of your initial configuration:

The total memory required for your data to achieve your target cache-hit rate, and

The number of nodes required to maintaining acceptable application performance without overloading the database backend in the event of node failure(s).

The amount of memory required is dependent upon the size of your data set and the access patterns of your application. To improve fault tolerance, once you have a rough idea of the total memory required, divide that memory into enough nodes such that your application can survive the loss of one or two nodes. For example, if your memory requirement is 13GB, you may want to use two cache.m4.large nodes instead of using one cache.m4.xlarge node. It is important that other systems such as databases will not be overloaded if the cache-hit rate is temporarily reduced during failure recovery of one or more of nodes. Please refer to the Amazon ElastiCache User Guide for more details.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Can a cluster span multiple Availability Zones?

Configuration and Scaling

Amazon ElastiCache for Memcached | Database

A

Yes. When creating a cluster or adding nodes to an existing cluster, you can chose the availability zones for the new nodes. You can either specify the requested amount of nodes in each availability zones or select “spread nodes across zones”. If the cluster is in VPC, nodes can only be placed in availability zones that are part of the selected cache subnet group. For additional details please see ElastiCache VPC documentation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How many nodes can I run per region in Amazon ElastiCache Memcached?

Configuration and Scaling

Amazon ElastiCache for Memcached | Database

A

You can run a maximum of 100 nodes per region. If you need more nodes, please fill in the ElastiCache Limit Increase Request form.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How does Amazon ElastiCache respond to node failure?

Configuration and Scaling

Amazon ElastiCache for Memcached | Database

A

The service will detect the node failure and react with the following automatic steps:

Amazon ElastiCache will repair the node by acquiring new service resources, and will then redirect the node’s existing DNS name to point to the new service resources. For VPC installations, ElastiCache will ensure that both the DNS name and the IP address of the node remain the same when nodes are recovered in case of failure. For non-VPC installations, ElastiCache will ensure that the DNS name of a node is unchanged; however, the underlying IP address of the node can change.

If you associated an SNS topic with your cluster, when the new node is configured and ready to be used, Amazon ElastiCache will send an SNS notification to let you know that node recovery occurred. This allows you to optionally arrange for your applications to force the Memcached client library to attempt to reconnect to the repaired nodes. This may be important, as some Memcached libraries will stop using a server (node) indefinitely if they encounter communication errors or timeouts with that server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

If I determine that I need more memory to support my application, how do I increase the total memory with Amazon ElastiCache?

Compatibility

Amazon ElastiCache for Memcached | Database

A

You could add more nodes to your existing Memcached Cluster by using the “Add Node” option on “Nodes” tab for your Cache Cluster on the AWS Management Console or calling the ModifyCacheCluster API.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How does Amazon ElastiCache interact with other Amazon Web Services?

Compatibility

Amazon ElastiCache for Memcached | Database

A

Amazon ElastiCache is ideally suited as a front-end for Amazon Web Services like Amazon RDS and Amazon DynamoDB, providing extremely low latency for high performance applications and offloading some of the request volume while these services provide long lasting data durability. The service can also be used to improve application performance in conjunction with Amazon EC2 and EMR.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Is Amazon ElastiCache better suited to any specific programming language?

Compatibility

Amazon ElastiCache for Memcached | Database

A

Memcached client libraries are available for many, if not all of the popular programming languages. For more information on Memcached clients, please see this. If you encounter any issues with specific Memcached clients when using Amazon ElastiCache, please engage us via the Amazon ElastiCache community forum.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What popular Memcached libraries are compatible with Amazon ElastiCache?

Auto Discovery

Amazon ElastiCache for Memcached | Database

A

Amazon ElastiCache does not require specific client libraries and works with existing Memcached client libraries without recompilation or application re-linking (Memcached 1.4.5 and later); examples include libMemcached (C) and libraries based on it (e.g. PHP, Perl, Python), spyMemcached (Java) and fauna (Ruby).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Auto Discovery and what can I do with it?

Auto Discovery

Amazon ElastiCache for Memcached | Database

A

Auto Discovery is a feature that saves developers time and effort, while reducing complexity of their applications. Auto Discovery enables automatic discovery of cache nodes by clients when they are added to or removed from an Amazon ElastiCache cluster. Until now to handle cluster membership changes, developers must update the list of cache node endpoints manually. Depending on how the client application is architected, typically a client initialization, by shutting down the application and restarting it, is needed resulting in downtime. Through Auto Discovery we are eliminating this complexity. With Auto Discovery, in addition to being backwards protocol-compliant with the Memcached protocol, Amazon ElastiCache provides clients with information on cache cluster membership. A client capable of processing the additional information reconfigures itself, without any initialization, to use the most current nodes of an Amazon ElastiCache cluster.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does Auto Discovery work?

Auto Discovery

Amazon ElastiCache for Memcached | Database

A

An Amazon ElastiCache cluster can be created with nodes that are addressable via named endpoints. With Auto Discovery the Amazon ElastiCache cluster is also given a unique Configuration Endpoint which is a DNS Record that is valid for the lifetime of the cluster. This DNS Record contains the DNS Names of the nodes that belong to the cluster. Amazon ElastiCache will ensure that the Configuration Endpoint always points to at least one such “target” node. A query to the target node then returns endpoints for all the nodes of the cluster in question. After this, you can connect to the cluster nodes just as before and use the Memcached protocol commands such as get, set, incr and decr. For more details, see here. To use Auto Discovery, you will need an Auto Discovery capable client. Auto Discovery clients for Java and PHP are available for download from the Amazon ElastiCache console. Upon initialization, the client will automatically determine the current members of the Amazon ElastiCache cluster using the Configuration Endpoint. When you make changes to your cache cluster by adding or removing nodes or if a node is replaced upon failure, the Auto Discovery client automatically determines the changes and you do not need to initialize your clients manually.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How can I get started using Auto Discovery?

Auto Discovery

Amazon ElastiCache for Memcached | Database

A

To get started, download the Amazon ElastiCache Cluster Client by clicking the “Download ElastiCache Cluster Client” link on the Amazon ElastiCache console. Before you can download, you must have an Amazon ElastiCache account; if you do not already have one, you can sign up from the Amazon ElastiCache detail page. After you download the client, you can begin setting up and activating your Amazon ElastiCache cluster by visiting the Amazon ElastiCache console. More details can be found here.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

If I continue to use my own Memcached clients with my ElastiCache cluster – will I be able to get this feature?

Auto Discovery

Amazon ElastiCache for Memcached | Database

A

No, you will not get the Auto Discovery feature with the existing Memcached clients. To use the Auto Discovery feature a client must be able to use a Configuration Endpoint and determine the cluster node endpoints. You may either use the Amazon ElastiCache Cluster Client or extend your existing Memcached client to include the Auto Discovery command set.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the minimum hardware / software requirements for Auto Discovery?

Auto Discovery

Amazon ElastiCache for Memcached | Database

A

To take advantage of Auto Discovery, an Auto Discovery capable client must be used to connect to an Amazon ElastiCache Cluster. Amazon ElastiCache currently supports Auto Discovery capable clients for both Java and PHP. These can be downloaded from the Amazon ElastiCache console. Our customers can create clients for any other language by building upon the popular Memcached clients available.

17
Q

How do I modify or write my own Memcached client to support auto-discovery?

Auto Discovery

Amazon ElastiCache for Memcached | Database

A

You can take any Memcached Client Library and add support for Auto Discovery. If you would like to add or modify your own client to enable Auto Discovery, please refer to the Auto Discovery command set documentation.

18
Q

Can I continue to work with my existing Memcached client if I don’t need Auto-discovery?

Auto Discovery

Amazon ElastiCache for Memcached | Database

A

Yes, Amazon ElastiCache is still Memcached protocol compliant and does not require you to change your clients. However, for taking advantage of auto-discovery feature, we had to enhance the Memcached client capabilities. If you choose to not use the Amazon ElastiCache Cluster Client, you can continue to use your own clients or modify your own client library to understand the auto-discovery command set.

19
Q

Can I have heterogeneous clients when using Auto Discovery?

Auto Discovery

Amazon ElastiCache for Memcached | Database

A

Yes, the same Amazon ElastiCache cluster can be connected through an Auto Discovery capable Client and the traditional Memcached client at the same time. Amazon ElastiCache remains 100% Memcached compliant.

20
Q

Can I stop using Auto Discovery?

Engine Version Management

Amazon ElastiCache for Memcached | Database

A

Yes, you can stop using Auto Discovery anytime. You can disable Auto Discovery by specifying the mode of operation during the Amazon ElastiCache Cluster client initialization. Also, since Amazon ElastiCache continues to support Memcached 100% you may use any Memcached protocol-compliant client as before.

21
Q

Can I control if and when the engine version powering Amazon ElastiCache Cluster is upgraded to new supported versions?

Engine Version Management

Amazon ElastiCache for Memcached | Database

A

Amazon ElastiCache allows you to control if and when the Memcached protocol-compliant software powering your cluster is upgraded to new versions supported by Amazon ElastiCache. This provides you with the flexibility to maintain compatibility with specific Memcached versions, test new versions with your application before deploying in production, and perform version upgrades on your own terms and timelines. Version upgrades involve some compatibility risk, thus they will not occur automatically and must be initiated by you. This approach to software patching puts you in the driver’s seat of version upgrades, but still offloads the work of patch application to Amazon ElastiCache. You can learn more about version management by reading the FAQs that follow. Alternatively, you can refer to the Amazon ElastiCache User Guide. While Engine Version Management functionality is intended to give you as much control as possible over how patching occurs, we may patch your cluster on your behalf if we determine there is any security vulnerability in the system or cache software.

22
Q

How do I specify which supported Memcached Version my Cluster should run?

Engine Version Management

Amazon ElastiCache for Memcached | Database

A

You can specify any currently supported version (minor and/or major) when creating a new cluster. If you wish to initiate an upgrade to a supported engine version release, you can do so using the “Modify” option for your cluster. Simply specify the version you wish to upgrade to via the “Cache Engine Version” field. The upgrade will then be applied on your behalf either immediately (if the “Applied Immediately” option is checked) or during the next scheduled maintenance window for your cluster.

23
Q

Can I test my cluster against a new version before upgrading?

Engine Version Management

Amazon ElastiCache for Memcached | Database

A

Yes. You can do so by creating a new cluster with the new engine version. You can point your development/staging application to this cluster, test it and decide whether or not to upgrade your original cluster.

24
Q

Does Amazon ElastiCache provide guidelines for supporting new Memcached version releases and/or deprecating versions that are currently supported?

Engine Version Management

Amazon ElastiCache for Memcached | Database

A

Over time, we plan to support additional Memcached versions for Amazon ElastiCache, both major and minor. The number of new version releases supported in a given year will vary based on the frequency and content of the Memcached version releases and the outcome of a thorough vetting of the release by our engineering team. However, as a general guidance, we aim to support new Memcached versions within 3-5 months of their General Availability release.

25
Q

Which version of the Memcached wire protocol does Amazon ElastiCache support?

Engine Version Management

Amazon ElastiCache for Memcached | Database

A

Amazon ElastiCache supports the Memcached text and binary protocol of versions 1.4.5, 1.4.14, 1.4.24, 1.4.33, and 1.4.34 of Memcached.