Download Amazon ElastiCache User Guide
Transcript
Amazon ElastiCache User Guide Node Auto Discovery (Memcached) Cache Engine Version 1.4.14 or Higher For cache engine version 1.4.14 or higher, use the config command. This command has been added to the Memcached ASCII and binary protocols by ElastiCache, and is implemented in the ElastiCache Cluster Client. If you want to use Auto Discovery with another client library, then that library will need to be extended to support the config command. Note The following documentation pertains to the ASCII protocol; however, the config command supports both ASCII and binary. If you want to add Auto Discovery support using the binary protocol, refer to the source code for the ElastiCache Cluster Client. Syntax config [sub-command] [key] Options Name Description Required sub-command The sub-command used to interact with a cache node. For Auto Discov- Yes ery, this sub-command is get. key The key under which the cluster configuration is stored. For Auto Discov- Yes ery, this key is named cluster. To get the cluster configuration information, use the following command: config get cluster Cache Engine Version Lower Than 1.4.14 To get the cluster configuration information, use the following command: get AmazonElastiCache:cluster Note We recommend that you do not tamper with the "AmazonElastiCache:cluster" key, since this is where the cluster configuration information resides. If you do overwrite this key, then the client may be incorrectly configured for a brief period of time (no more than 15 seconds) before ElastiCache automatically and correctly updates the configuration information. Output Format Whether you use config get cluster or get AmazonElastiCache:cluster, the reply consists of two lines: • The version number of the configuration information. Each time a node is added or removed from the cache cluster, the version number increases by one. • A list of cache nodes. Each node in the list is represented by a hostname|ip-address|port group, and each node is delimited by a space. A carriage return and a linefeed character (CR + LF) appears at the end of each line. A cache cluster containing three nodes would be represented as follows: API Version 2015-02-02 124