How Auto Discovery Works
This section describes how client applications use ElastiCache Cluster Client to manage cache node connections, and interact with data items in the cache.
Connecting to Cache Nodes
From the application's point of view, connecting to the cluster configuration endpoint is no different than connecting directly to an individual cache node. The following sequence diagram shows the process of connecting to cache nodes.
Process of Connecting to Cache Nodes
|The application resolves the configuration endpoint's DNS name. Because the configuration endpoint maintains CNAME entries for all of the cache nodes, the DNS name resolves to one of the nodes; the client can then connect to that node.|
|The client requests the configuration information for all of the other nodes. Since each node maintains configuration information for all of the nodes in the cluster, any node can pass configuration information to the client upon request.|
The client receives the current list of cache node hostnames and IP addresses. It can then connect to all of the other nodes in the cluster.
The client program refreshes its list of cache node hostnames and IP addresses once per minute. This polling interval can be adjusted if necessary.
Normal Cluster Operations
When the application has connected to all of the cache nodes, ElastiCache Cluster Client determines which nodes should store individual data items, and which nodes should be queried for those data items later. The following sequence diagram shows the process of normal cluster operations.
Process of Normal Cluster Operations
|The application issues a get request for a particular data item, identified by its key.|
|The client uses a hashing algorithm against the key to determine which cache node contains the data item.|
|The data item is requested from the appropriate node.|
|The data item is returned to the application.|