How to Setup Redis Server on Azure/AWS/GCP

To setup and install Redis server on any of the cloud platforms, the easiest way is to use the image available in the cloud marketplaces below.  Redis is an open source (BSD licensed), in-memory data structure store, used as a redis database, redis cache, and message broker.

Getting Started

 

Once your Redis server has been deployed, the following links explain how to connect to a Linux VM:

 

 

Once connected and logged in, you’re ready to start configuring Redis.

Using Redis

 

Redis-server is configured to start automatically.

 

Check if Redis is working

 

External programs talk to Redis using a TCP socket and a Redis specific protocol. This protocol is implemented in the Redis client libraries for the different programming languages. However to make hacking with Redis simpler Redis provides a command line utility that can be used to send commands to Redis. This program is called redis-cli.

 

The first thing to do in order to check if Redis is working properly is sending a PING command using redis-cli:

 

redis-cli ping

PONG

Redis-cli-ping

 

Running redis-cli followed by a command name and its arguments will send this command to the Redis instance running on localhost at port 6379. You can change the host and port used by redis-cli, just try the –help option to check the usage information.

 

Another interesting way to run redis-cli is without arguments: the program will start in interactive mode, you can type different commands and see their replies.

 

redis-cli

 

testing-redis

 

 

Redis Default Configuration

 

Redis has been setup with the default configuration:

 

Listening port: 6379

Redis Config file on Ubuntu: /etc/redis/redis.conf

Redis Config file on CentOS: /etc/redis.conf

Logfile: The path to where you would like your logs stored can be set within the redis.conf under logfile ” “ line

 

Redis Documentation

 

Documentation on using Redis can be found on : https://redis.io/documentation

Redis Firewall Ports

 

By default Redis is set to listen on port 6379

 

For a full list on the required firewall ports, review – 

 

Clustering Ports:

https://docs.redislabs.com/latest/rs/administering/designing-production/networking/port-configurations/

 

To setup AWS firewall rules refer to – AWS Security Groups

To setup Azure firewall rules refer to – Azure Network Security Groups

To setup Google GCP firewall rules refer to – Creating GCP Firewalls

Disclaimer: Redis is a registered trademark of Redis Labs Ltd and is licensed under 3-Clause-BSD. No warrantee of any kind, express or implied, is included with this software. Use at your risk, responsibility for damages (if any) to anyone resulting from the use of this software rest entirely with the user. The author is not responsible for any damage that its use could cause.
Andrew Fitzgerald

Cloud Solution Architect. Helping customers transform their business to the cloud. 20 years experience working in complex infrastructure environments and a Microsoft Certified Solutions Expert on everything Cloud

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x