<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dikapediav2.com/wiki/index.php?action=history&amp;feed=atom&amp;title=ElastiCache</id>
	<title>ElastiCache - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://dikapediav2.com/wiki/index.php?action=history&amp;feed=atom&amp;title=ElastiCache"/>
	<link rel="alternate" type="text/html" href="https://dikapediav2.com/wiki/index.php?title=ElastiCache&amp;action=history"/>
	<updated>2026-05-15T09:15:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://dikapediav2.com/wiki/index.php?title=ElastiCache&amp;diff=68&amp;oldid=prev</id>
		<title>Ardika Sulistija: Created page with &quot;====How to install Redis-cli==== ----  How to install Redis-cli on Amazon Linux 2:  $ sudo yum -y install openssl-devel gcc  $ wget http://download.redis.io/redis-stable.tar.gz  $ tar xvzf redis-stable.tar.gz  $ cd redis-stable  $ make distclean  $ make redis-cli BUILD_TLS=yes  $ sudo install -m 755 src/redis-cli /usr/local/bin/   ==== Is there downtime when changing node type? (scaling up)==== ----  Reference:&lt;/br&gt; [1] Cluster mode disabled &lt;/br&gt; https://docs.aws.amazon...&quot;</title>
		<link rel="alternate" type="text/html" href="https://dikapediav2.com/wiki/index.php?title=ElastiCache&amp;diff=68&amp;oldid=prev"/>
		<updated>2024-08-27T00:12:03Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;====How to install Redis-cli==== ----  How to install Redis-cli on Amazon Linux 2:  $ sudo yum -y install openssl-devel gcc  $ wget http://download.redis.io/redis-stable.tar.gz  $ tar xvzf redis-stable.tar.gz  $ cd redis-stable  $ make distclean  $ make redis-cli BUILD_TLS=yes  $ sudo install -m 755 src/redis-cli /usr/local/bin/   ==== Is there downtime when changing node type? (scaling up)==== ----  Reference:&amp;lt;/br&amp;gt; [1] Cluster mode disabled &amp;lt;/br&amp;gt; https://docs.aws.amazon...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;====How to install Redis-cli====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
How to install Redis-cli on Amazon Linux 2:&lt;br /&gt;
 $ sudo yum -y install openssl-devel gcc&lt;br /&gt;
 $ wget http://download.redis.io/redis-stable.tar.gz&lt;br /&gt;
 $ tar xvzf redis-stable.tar.gz&lt;br /&gt;
 $ cd redis-stable&lt;br /&gt;
 $ make distclean&lt;br /&gt;
 $ make redis-cli BUILD_TLS=yes&lt;br /&gt;
 $ sudo install -m 755 src/redis-cli /usr/local/bin/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Is there downtime when changing node type? (scaling up)====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Reference:&amp;lt;/br&amp;gt;&lt;br /&gt;
[1] Cluster mode disabled &amp;lt;/br&amp;gt;&lt;br /&gt;
https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Scaling.RedisReplGrps.ScaleUp.html&amp;lt;/br&amp;gt;&lt;br /&gt;
[2] Cluster mode enabled &amp;lt;/br&amp;gt;&lt;br /&gt;
https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/redis-cluster-vertical-scaling-scaling-up.html&amp;lt;/br&amp;gt;&lt;br /&gt;
[3] Making manual backups&amp;lt;/br&amp;gt;&lt;br /&gt;
https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-manual.html&lt;br /&gt;
&lt;br /&gt;
When the scale-up process is initiated, ElastiCache does the following:&lt;br /&gt;
&lt;br /&gt;
1. Launches a replication group using the new node type.&lt;br /&gt;
&lt;br /&gt;
2. Copies all the data from the current primary node to the new primary node.&lt;br /&gt;
&lt;br /&gt;
3. Syncs the new read replicas with the new primary node.&lt;br /&gt;
&lt;br /&gt;
4. Updates the DNS entries so they point to the new nodes. Because of this you don&amp;#039;t have to update the endpoints in your application. &amp;lt;b&amp;gt;For Redis 5.0.5 and above, you can scale auto failover enabled clusters while the cluster continues to stay online and serve incoming requests.On version 5.0.4 and below, you may notice a brief interruption of reads and writes on previous versions from the primary node while the DNS entry is updated&amp;lt;/b&amp;gt; .&lt;br /&gt;
&lt;br /&gt;
5. Deletes the old nodes (CLI/API: replication group). You will notice a brief interruption (a few seconds) of reads and writes from the old nodes because the connections to the old nodes will be disconnected.&lt;br /&gt;
&lt;br /&gt;
In conclusion, there will be minimal downtime (associated with DNS updates) during scaling up process. Due to the DNS record will be updated to point to the new nodes, you will notice a brief interruption.&lt;br /&gt;
&lt;br /&gt;
For Cluster mode disabled: [1]&amp;lt;/br&amp;gt;&lt;br /&gt;
During this process, there may be a brief interruption of reads and writes for other versions from the primary node while the DNS entry is updated. you might see less than 1 second downtime for nodes running on 5.0.5 versions and above and a few seconds for older versions.&lt;br /&gt;
&lt;br /&gt;
For Cluster mode enabled: [2]&amp;lt;/br&amp;gt;&lt;br /&gt;
During this process, your Redis cluster will continue to serve requests with minimal downtime.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Recommendation&amp;lt;/b&amp;gt;&amp;lt;/br&amp;gt;&lt;br /&gt;
As the scale up/down processes rely on creating nodes with newly selected node types and synchronizing the new nodes with the previous ones. We recommend that you initiate scale up/down during hours when you expect data traffic to be at its minimum. &lt;br /&gt;
&lt;br /&gt;
Additionally, you can create a manual backup of the cluster [3] before making modifications to your cluster in case you need to restore the data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====How to connect to an Amazon ElastiCache In-Transit encryption-enabled Redis node using redis-cli====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
video: https://www.youtube.com/watch?v=p9hl4GLaxqE&amp;amp;t=4s&lt;br /&gt;
&lt;br /&gt;
 Short description&lt;br /&gt;
&lt;br /&gt;
The redis-cli client doesn&amp;#039;t support SSL/TLS connections. To use the redis-cli to access an ElastiCache for Redis node (cluster mode disabled) with in-transit encryption, use the stunnel package in your Linux-based clients. The stunnel command creates an SSL tunnel to Redis nodes specified in the stunnel configuration. After establishing the tunnel, you can use the redis-cli to connect an in-transit encryption enabled cluster node.&lt;br /&gt;
&lt;br /&gt;
Note: To connect to Redis nodes (cluster-mode enabled) with in-transit encryption, use Redis clients that natively support SSL and Cluster Mode Enabled Clusters. For more information, see Redis.io/clients on the Redis website.&lt;br /&gt;
Resolution&lt;br /&gt;
&lt;br /&gt;
1.    Connect to your Linux client instance using SSH and install the stunnel package:&lt;br /&gt;
&lt;br /&gt;
On CentOS-based systems:&lt;br /&gt;
 $sudo yum install stunnel&lt;br /&gt;
&lt;br /&gt;
On Debian-based systems (Ubuntu 16):&lt;br /&gt;
 $sudo apt-get install stunnel&lt;br /&gt;
&lt;br /&gt;
2.    In the redis-cli.conf file, add a Redis cluster endpoint to one or more connection parameters:&lt;br /&gt;
 # cat /etc/stunnel/redis-cli.conf&lt;br /&gt;
 fips = no&lt;br /&gt;
 setuid = root&lt;br /&gt;
 setgid = root&lt;br /&gt;
 pid = /var/run/stunnel.pid&lt;br /&gt;
 debug = 7&lt;br /&gt;
 options = NO_SSLv2&lt;br /&gt;
 options = NO_SSLv3&lt;br /&gt;
 [redis-cli]&lt;br /&gt;
   client = yes&lt;br /&gt;
   accept = 127.0.0.1:6379&lt;br /&gt;
   connect = master.ssltest.wif0lh.use1.cache.amazonaws.com:6379&lt;br /&gt;
 [redis-cli-replica]&lt;br /&gt;
   client = yes&lt;br /&gt;
   accept = 127.0.0.1:6380&lt;br /&gt;
   connect = ssltest-002.ssltest.wif0lh.use1.cache.amazonaws.com:6379 &lt;br /&gt;
&lt;br /&gt;
In this example, the config file has two connections, the redis-cli and the redis-cli-replica. The parameters are set as follows:&lt;br /&gt;
&lt;br /&gt;
* client set to yes, to specify this stunnel instance is a client.&lt;br /&gt;
* accept is set to the client IP. In this example, the primary is set to the Redis default of 127.0.0.1 on port 6379. The replica must call a different port and it is set to 6380. You can use the ephemeral ports 1024 to 65535.&lt;br /&gt;
* connect is set to the Redis server endpoint. For more information, see Finding connection endpoints.&lt;br /&gt;
&lt;br /&gt;
3.    Start stunnel.&lt;br /&gt;
 $ sudo stunnel /etc/stunnel/redis-cli.conf&lt;br /&gt;
&lt;br /&gt;
Use the netstat command to confirm that the tunnels have started:&lt;br /&gt;
 # netstat -tulnp | grep -i stunnel&lt;br /&gt;
 tcp    0      0 127.0.0.1:6379      0.0.0.0:*        LISTEN      3189/stunnel&lt;br /&gt;
 tcp    0      0 127.0.0.1:6380      0.0.0.0:*        LISTEN      3189/stunnel&lt;br /&gt;
&lt;br /&gt;
4.    You can now use the redis-cli to connect to the encrypted Redis node using the local endpoint of the tunnel:&lt;br /&gt;
 # src/redis-cli -h localhost -p 6379 -a MySecretPassword&lt;br /&gt;
 localhost:6379&amp;gt;set foo &amp;quot;bar&amp;quot;&lt;br /&gt;
 OK&lt;br /&gt;
 localhost:6379&amp;gt;get foo&lt;br /&gt;
 &amp;quot;bar&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Note: If your instance is password-protected, then the -a MySecretPassword option in redis-cli performs the authentication without needing the AUTH command. For more information, see redis-cli, the Redis command line interface on the Redis website.&lt;br /&gt;
&lt;br /&gt;
This example uses telnet to connect to the Redis server:&lt;br /&gt;
 # telnet localhost 6379&lt;br /&gt;
 Trying 127.0.0.1...&lt;br /&gt;
 Connected to localhost.&lt;br /&gt;
 Escape character is &amp;#039;^]&amp;#039;.&lt;br /&gt;
 auth MySecretPassword&lt;br /&gt;
 +OKget foo&lt;br /&gt;
 $3&lt;br /&gt;
 bar&lt;br /&gt;
&lt;br /&gt;
Run the pkill command to stop and close the SSL tunnels:&lt;br /&gt;
 $ sudo pkill stunnel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Example LUA Script====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
 eval &amp;quot;redis.call(&amp;#039;set&amp;#039;,&amp;#039;value1&amp;#039;,&amp;#039;1&amp;#039;) local sum = 0 for i=1,10000000000000000 do sum = sum + i end return &amp;#039;ok&amp;#039;&amp;quot; 0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Test SSL connection to Redis cluster if in-transit encryption is enabled====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
 openssl s_client -connect elasticache_endpoint:6379&lt;br /&gt;
&lt;br /&gt;
It will provide a long output where the last line should be “OK”, then you can run “AUTH &amp;lt;passphrase&amp;gt;” if authentication is enabled, or otherwise just run redis commands like INFO. It will confirm that the engine is reachable.&lt;/div&gt;</summary>
		<author><name>Ardika Sulistija</name></author>
	</entry>
</feed>