Redis Production Checklist

By: Morpheus Data

Don’t Go Into Redis Production Without this Checklist

Are you going into production with Redis? Make sure you have done everything on this checklist!

TL;DR: If you are going into production with Redis, it is a good idea to check over a few things before you go live. For production, you will want to be sure everything is configured properly and that maintenance will be as easy as possible for your team.

With that in mind, here is a checklist you can use to help you better prepare for using Redis in production.

Run the Redis benchmark

One test you can run is the Redis benchmark. The benchmark will perform a stress test on your Redis installation to ensure everything will run smoothly with your current settings. An example of running the benchmark from the command line is shown below.

An example of running the Redis benchmark.

In this case, the test will run 100,000 requests from 50 different clients, which are all sending 10 commands at once.

Firewall the Redis port

The Redis port should only be directly accessible to the specific computers that are being used to implement your Redis application. As a result, the Redis port should be restricted by a firewall to prevent outside (and potentially unwanted) access to the system.

Set an authentication password

Enabling the Redis authorization layer allows queries from unauthorized clients to be refused. To be authorized, the client must send and AUTH command with the correct password.

This can act as a redundant layer of security in case, for instance, the firewall fails. The authentication password can be set by a system administrator inside the redis.conf file.

Backup and logging

Backups and logs are always good to have if something should go wrong. Redis provides two options, which can be used individually or both at the same time.

RDB (Redis Database File) – With RDB enabled, you will have access to point-in-time snapshots of the dataset, which allows you to easily restore the dataset if needed. However, since snapshots are taken at intervals, you may lose some data between the last snapshot and the incident.

AOF (Append Only File) – With AOF enabled, Redis will log all write operations. Since the data is written instantly, you can recover even the most recent data.

It is often recommended that both of these options be enabled, so that you have both available when you need to recover data after an incident.

Disable potentially harmful commands

Some commands could be harmful in the wrong hands, so disabling them in production may be a good idea. Some of these could include:

  • FLUSHALL – removes all keys from all databases
  • FLUSHDB – removes all keys from the current database
  • CONFIG – allows runtime server configuration
  • SHUTDOWN – shuts down Redis

To disable a command, simply rename it to an empty string.

Disabling a Redis command by renaming it to an empty string.

Get Your Own Hosted Database

One you have your Redis implementation prepared for production, you will want reliable and stable database hosting. Morpheus Virtual Appliance is a tool that allows you manage heterogeneous databases in a single dashboard.

With Morpheus, you have support for SQL, NoSQL, and in-memory databases like Redis across public, private, and hybrid clouds. So, visit the Morpheus site for pricing information or to create a free account today!