Docker and Redis issues

In the chapter on Redis Cluster and Sentinel we didn't cover some major issues that can occur when trying to deploy Redis's high availability solution when using Docker. Docker performs a dynamic port reallocation when using the –p directive when launching a new Docker container. Sentinel's auto discovery of other running Sentinel process as well as discovering a list of slaves from a master assumes a fixed port numbers, this Sentinel feature will break if the internally running Sentinel on a Docker container is mapped to a different port.

To use Sentinel with Docker you have two options: the first is to update the sentinel announce-ip and sentinel announce-port for each of Docker container running Sentinel so that the Docker ...

Get Mastering Redis now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.