Quantcast
Channel: nixCraft
Viewing all articles
Browse latest Browse all 308

How to set up Redis sentinel cluster on Ubuntu or Debian LinuxOpensource Flare✨

$
0
0

{nixCraft Patreon supporters content}

This guide explains how to set up Redis sentinel failover cluster for caching database or any other data type in high availability node.

Software and hardware requirements

Minimum three VMs running at cloud providers or bare metal servers. Always keep an ODD number of servers.
  1. Ubuntu 20.04 or Debian 10 Linux LTS.
  2. Redis server with sentinel on each VM.
  3. HAProxy for load balancing and traffic redirection to healthy Redis node for writing or reading data.
  4. Keepalived for IP failover for HAProxys.
  5. The Redis cluster will be protected using firewall, password, and VLAN or VPC.
  6. Email-based alert for HAproxy and Keepalived cluster.
  7. Simple web-based stats for Redis.
Out sample setup:

How to set up Redis sentinel cluster on Ubuntu or Debian Linux

All clients (your web app written in Python/PHP/Perl) will send Redis to read and write requests to 172.0.0.5 TCP port 6379. HAproxy will redirect read requests based upon the health status of the Redis server among three servers. The Redis write request will redirect to an active node in the sentinel cluster. Keepalived is used to maintain standby HAPorxy node in case primary HAPorxy node is down for any reason. In addition, Keepalived will provide IP failover based upon the VRRP protocol running on an interface. This in-depth guide will cover the following topics:

toc-redis-cluster-preview

The post How to set up Redis sentinel cluster on Ubuntu or Debian Linux appeared first on Opensource Flare✨.


Viewing all articles
Browse latest Browse all 308

Trending Articles