Open Lt-Flash opened 2 years ago
Another idea - maybe it would be good to have all REDIS servers defined in a modparam or in DB so OpenSIPS could pre-open connections to all REDIS master/slave servers and as soon as it receives 'MOVED' response it can just use already open connection. If the server in 'MOVED' reply not listed then new connection needs to be open.
Just a reference to Kamalio's module, it seem to support 'MOVED' operations:
https://www.kamailio.org/docs/modules/devel/modules/ndb_redis.html
@Lt-Flash Is there an issue using Redis sentinel setup with Opensips (1 master - 2 slaves and based on the quorum value failover can happen and the master can be elected) MOVE command support is needed only when we go for Redis Cluster setup like multiple master-slave 1:1 master: slave
cluster setup.
There is no issue using REDIS Sentinel, but the feature request is for REDIS Cluster. And REDIS Cluster is giving much more features than Sentinel which is just a failover solution.
@bogdan-iancu by when this cluster support will be available? any rough timeline?
for the moment there is no plan for this feature
Is your feature request related to a problem? Please describe. It's both a feature request and a problem we've experienced. We were using a single instance of REDIS server without any issues for a long time. Recently we have deployed a REDIS cluster consisting of three MASTER nodes and three SLAVE nodes and run into an issue. REDIS protocol shards data between nodes in a cluster so when you're connected to M1 node (for example) but KEY you're looking for is on another node REDIS will respond with (for example):
And as per REDIS documentation (https://redis.io/docs/reference/cluster-spec/):
This behaviour disallows us to use REDIS cluster even with HAProxy or some other load balancer in front of it as the proxy can't analyze actual REDIS protocol and re-connect client to another REDIS node.
Describe the solution you'd like Update OpenSIPS REDIS cache module to support recent version of REDIS cluster.
Implementation
Describe alternatives you've considered The only alternative is to continue using a single REDIS instance with a probable VRRP backup and some synchronization between them.
Thank you!