1

The objective is to create a highly available redis cluster using kubernetes for a nodeJS client. I have already created the architecture as below: Created a Kubernetes cluster of Kmaster with 3 nodes (slaves). Then I created statefulsets and persistent volumes (6 - one for each POD). Then created Redis pods 2 on each node (3 Master, 3 replicas of respective master).

I need to understand the role of Redis Sentinel hereafter, how does it manage the monitoring, scaling, HA for the redis-cluster PODs across the nodes. I understand Sentinel should be on each node and doing its job but what should be the right architecture here?

P.S. I have created a local setup for now, but ultimately this goes on Azure so any suggestions w.r.to az is also welcome.

Thanks!

naville
  • 31
  • 3

1 Answers1

0

From an Azure perspective, you have two options and if you are very specific to option two but are looking for the Sentinel architecture piece, there is business continuity and high availability options in both IaaS (Linux VM scale sets) and PaaS services that go beyond the Sentinel component.

  1. Azure Cache for Redis (PaaS) where you choose & deploy your desired service tier (Premium Tier required for HA) and connect your client applications. Please see: Azure Cache for Redis FAQ and Caching Best Practice.
  2. The second option is to deploy a solution (as you have detailed) as an IaaS solution built from Azure VMs. There are a number of Redis Linux VM images to choose from the Azure Marketplace or there is the option to create a Linux VM OS image from your on-premise solution and migrate that to Azure. The Sentinel component is enabled on each server (master, slavea, and slaveb, ...). There are networking and other considerations too. For building a system from scratch, please see: How to Setup Redis Replication (with Cluster-Mode Disabled) in CentOS 8 – Part 1 and How to Setup Redis For High Availability with Sentinel in CentOS 8 – Part 2
Mike Ubezzi
  • 1,007
  • 6
  • 8
  • I see nobody has provided any feedback but did want to add the Azure perspective. Please do let me know if you have any additional questions. – Mike Ubezzi Jul 24 '20 at 01:03
  • Thanks Mike. I kind of went with the second option - since needed to create a generic setup irrespective of Azure's offering. So finally went with a VMSS Azure AKS cluster with 3 [kuber] slave nodes hosting Redis pods - 3 master, 3 slaves - so 3 shards (2 Pods on each node, 1 slave & 1 master - making sure the master and corresponding slave shard are not on same node). Then used Sentinel on each POD, which is maintaining a quorum of 3 masters & Redis HA as needed. This is working good for now!! The kubernetes setup is deployed as a statefulset. – naville Aug 27 '20 at 20:22
  • Thank you for the additional detail. – Mike Ubezzi Aug 28 '20 at 21:23