'hiredis' is a minimalistic C client for Redis. Does anyone know if it supports -
- Redis Sentinel (the official high availability solution for Redis) https://redis.io/topics/sentinel
- and Redis Cluster https://redis.io/topics/cluster-tutorial
It is not clear from its Github page - https://github.com/redis/hiredis
YES and NO.
Since you can send any command to Redis with
hiredis
, you can get master/slave info from Redis Sentinel, or get the slots info from Redis Cluster. Sohiredis
can work with Redis Sentinel and Redis Cluster.However, since
hiredis
doesn't have high level API to work with sentinel and cluster, you have to do many work by yourself. If you need high level API, you need to try other libraries, for example:If you're coding with
C
, you can try hiredis-vip, which supports Redis Cluster. But I'm not sure if it supports Redis Sentinel.If you're coding with
C++
, you can try redis-plus-plus, which supports both Redis Cluster and Redis Sentinel, and has STL-like interfaces.Declaimer: I'm the author of redis-plus-plus.