Icinga / icingadb

Icinga configuration and state database supporting multiple environments
https://icinga.com
GNU General Public License v2.0
57 stars 21 forks source link

Redis Sentinel support #137

Open bootc opened 4 years ago

bootc commented 4 years ago

Our production Redis clusters use Sentinel for High Availability. Please add Sentinel support so that Icinga DB can automatically route requests to active nodes in the cluster as necessary.

lippserd commented 3 years ago

Team, does anyone know what specifics we need to change to support this?

julianbrost commented 2 years ago

On the Go side, this should be rather trivial as the lib we use supports that, we'd just have to create the client: https://pkg.go.dev/github.com/go-redis/redis/v8#NewFailoverClient

However, on the C++ side, we'd have to implement all that failover stuff. I don't know how complex that would be.

Also, the current HA model for Icinga 2 + Icinga DB expects one Redis server per Icinga 2 instance, so if you want HA, you just add a second Redis instance. Also note that even if we supported this, you couldn't have two Icinga 2 instances write into the same cluster.

So I don't really see a benefit for Icinga DB in supporting this right now.

Al2Klimov commented 2 years ago

one Redis server per Icinga 2 instance

... which ideally runs on the same machine as Icinga 2, so IMAO that feature just doesn’t fit in our concept.

yoshi314 commented 2 years ago

can an external redis cluster be used? i typically use redis-ha cluster in k8s for redis backends.

julianbrost commented 2 years ago

If it acts like a standard Redis server, it will be fine. I don't know if that's the case. Is redis-ha the same thing as Redis Sentinel?

yoshi314 commented 2 years ago

it's composed of optional haproxy frontend (to manage connections from outside of k8s) and 3 nodes with sentinel.

Al2Klimov commented 1 year ago

Wait. If a Redis sentinel cluster can be frontended by a HAproxy, one could also use shuffling DNS or iptables. So we don’t necessarily have to support this by ourselves.