

Starting with Redis version 3.0, you can use Redis Cluster - a data sharding solution, that automatically manages replication and failover. That means that one of the slave nodes will be elected master and all other slave nodes will be configured to use a new master. Sentinel can be configured to monitor both master and slave instances, and will perform automatic failover if the master node is not working as expected. The master/slave setup described above can be made highly available with Redis Sentinel. It will also allow distribution of reads among groups of slave copies as long as all write operations are handled by the master server. The simplest option, covered below, is the master/slave replication, which creates a real-time copy (or multiple copies) of master/server data. Redis provides several options for setting up distributed data stores. Make sure that the following values are set for appendonly and appendfsync settings in nf:

For the greatest level of data safety, consider running both persistence methods.īecause the point-in-time snapshot persistence is enabled by default, you only need to setup AOF persistence. Append-only logs of all the write operations performed by the server (AOF).Įach option has its own pros and cons, which are detailed in Redis documentation.Point-in-time snapshots of the dataset, made at specified intervals (RDB).Redis provides two options for disk persistence: Configure Redis Configure Persistence Options Run the command ping, which should return a PONG: 127.0.0.1:6379>pingĮnter exit or press Ctrl-C to exit from the redis-cli prompt. Verify Redis is up by running redis-cli: redis-cli Update packages and install redis-server package: sudo apt-get update Install the software-properties-common package: sudo apt-get install software-properties-commonĭownload and install the GPG key, as documented in the Update your system: sudo apt-get update & sudo apt-get upgrade Securing Your Server to create a standard user account, harden SSH access and remove unnecessary network services. Getting Started guide and complete the steps for setting your Linode’s hostname and timezone. Since Redis serves all data from memory, we recommend using a This document provides both instructions for deploying the Redis server and an overview of best practices for maintaining Redis instances. Redis can be made highly available with Redis Sentinel and supports automatic partitioning with Redis Cluster. Redis features built-in transactions, replication, and support for a variety of data structures such as strings, hashes, lists, sets and others. Redis is an open-source, in-memory, data-structure store with optional disk writes for persistence, which can be used as key-value database, cache and message broker.
