Notes to self: How do you know if a Redis cache is contactable?

I stood up a new Elasticache Redis cluster today for a colleague, and he was having trouble connecting. Often in AWS this means there’s a screwed up security group, but after checking the groups, he was still unable to connect.

So I logged into the staging server in question, raised my fingers to the keyboard and…

Realised I had no idea how to talk to Redis.

Luckily, the google is only a moment away.

First, installing telnet

Install-WindowsFeature telnet-client

The telnet client is not available by default, and I don’t install it at provision time. So from the PowerShell prompt, which is all I have available in Windows Core, I need to install it with Install-WindowsFeature.

Now, OK, so how do I connect to Redis?

telnet

open redisclusterdnsname.amazonaws.com 6379

Then what?

Best bet: issue the MONITOR command. This will give you a nice test of what’s going on in the cluster, and convince the developer standing at your left shoulder that yes, their web server can indeed talk to Redis.

Easy.

Leave a Reply

Your email address will not be published. Required fields are marked *