redis slave #5

Supports: precise
Add to new model


Redis is a key-value database in a similar vein to memcache but the
dataset is non-volatile. Redis additionally provides native support
for atomically manipulating and querying data structures such as lists
and sets. The dataset is stored entirely in memory and periodically
flushed to disk.
This charm provides the slave service.


Redis ( is an open source, advanced key-value cache and
store. It is often referred to as a data structure server since keys can
contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs.
In order to achieve its outstanding performance, Redis works with an in-memory
dataset that can be written to disk. Redis also supports master-slave
asynchronous replication.

Redis can be configured in a master or slave configuration. This charm
provides a slave implementation of Redis software. The slaves are configured
as read-only so you can not set values on a redis-slave. Go to the Redis
web pages for more information on replication.


To deploy this charm first bootstrap your Juju environment and issue the
following commands:

juju deploy redis-master
juju deploy redis-slave

juju add-relation redis-slave:redis-master redis-master:redis-master

Expose the slave or master if you need to contact them for some reason.

juju expose redis-slave


Redis replication is very simple to use with Juju. Simply deploy a
redis-master node and a redis-slave node and add the redis-master relation
between them. Adding a relation causes the charms to properly configure
master-slave replication on both servers without having to know how to
configure Redis replication.

Redis slaves contain the exact copy of the master server. Redis replication
is a non-blocking operation, meaning the master and slave will continue to
handle queries when synchronization starts from other nodes. A master can
have multiple slaves.

Go to the Redis web pages for more information on replication.

Testing Redis

To test if Redis software is functioning properly telnet to the redis ip
address using port 6379:

telnet redis-slave-ip 6379

You can also install the redis-tools package apt-get install redis-tools
and connect using the Redis client command:


From there you can issue Redis commands to test
that Redis is working as intended.

Note that redis-slave are configured as read-only so set commands will not work.

Known Limitations and Issues

If you run into problems or issues:

Go to the issue database on github to check for problems related to the Redis software.

Go to the redis-slave page on launchpad to check for redis-slave related bugs.

The Redis log file can be found on the deployed instance at:


There are no Juju configuration options for the redis-slave charm. Just deploy
the charm in Juju and you will have a working Redis installation!

Contact Information

The charm was originally created by Juan Negron

Redis Information