Redis

Redis is an in-memory key-value store which can be used as a performance enhancer to speed up web applications.

There are plugins available for CMSes and E-commerce frameworks that are usually easy to set up and configure. Magento comes with built-in support, and for WordPress you’ll need a plugin.

Redis is available as a paid add-on on Servebolt, on the Business plans and above. Redis instances are provided per site, meaning that you can have one Redis per site on your Bolt. You can order Redis by contacting your customer success representative, or support.

Your site’s Redis instance

The Redis instance you’ll get delivered is based on Unix sockets. This makes the service both faster than networking-based Redis, and more reliable and secure. When Redis is installed, you will see some new files and directories in your home folder. Most important is the file (socket) named redis.sock in your site’s home folder (not the public/ webroot, but the directory parent to that).

These are the new files you’ll see:

~/redis.sock # The unix socket
~/redis-data/ # Data store folder for persistent data
~/logs/redis.log # Log files for the server service

Command line tools – redis-cli

From the command line, you can communicate with your Redis instance by using the command line tool redis-cli. You’ll have to add the -s parameter to tell the client where the Unix socket is.

$ redis-cli -s ~/redis.sock 

An easy way to check if Redis is working is to see what it is doing by using the monitor command

$ redis-cli -s ~/redis.sock monitor
OK
.....

See the official documentation for further use of redis-cli, just remember to add the -s parameter!

Configuration and setup of your application

Depending on what type of web application you are using, you can usually find a plugin to enable Redis. In the configuration section, make sure to use unix sockets (not network / tcp).