Does Redission support pipelining to redis cluster?
RBatch in redission can be used to perform multiple hmset commands?
Yes, redisson RBatch batch = client.createBatch() does the pipelining in Redis cluster mode.
Verified this on redis cluster mode by submitting multiple fastPutAsync commands on single batch.
Related
I only need pub-sub feature from Redis without persistent layer/storage so which Redis deployment is a good choice. Standalone or sentinel(with master-slave replication)?
Redis by default have 16 databases that can be selected by using SELECT command.
But as per the docs, https://redis.io/commands/select,
When using Redis Cluster, the SELECT command cannot be used, since
Redis Cluster only supports database zero. In the case of a Redis
Cluster, having multiple databases would be useless and an unnecessary
source of complexity.
As per redis docs, cluster/HA is achieved by
cluster - https://redis.io/topics/cluster-tutorial
sentinel -
https://redis.io/topics/sentinel.
I am clear that Redis Cluster only supports database zero, but I couldn't get the info anywhere to check the support for multiple databases in Sentinel setup with multiple nodes?
Any reference to this would be helpful. Thanks!
With sentinel setup, you can have multiple databases.
Redis Sentinel is only used to provide HA for Redis, it doesn't change Redis in any way. And you can use this Redis as the single instance Redis without sentinel.
I am trying to setup an airflow cluster. I am planning to use redis as celery backend.
I have seen people using sentinel redis successfully. I wanted to know if it is possible to use redis cluster instead?
If not then why not?
Celery doesn't have support for using Redis cluster as broker. It can use Redis highly available setup as broker (with Sentinels), but has no support for Redis cluster to be used as broker.
Reference:
Airflow CROSSSLOT Keys in request don't hash to the same slot error using AWS ElastiCache
How to use more than 2 redis nodes in django celery
To make Redis cluster to work we need to change the celery backend! not a feasible solution.
https://github.com/hbasria/celery-redis-cluster-backend
Now that Redis Cluster comes with sharding, replication and automatic failover, do i still need to use Sentinel for failover handling ?
No. Sentinel is for managing the availability and providing service discovery when using Redis in single instance mode (single-master/one-or-more-slaves). When using Redis in cluster mode, Sentinel isn't needed.
Im trying to set a Redis cluster (3 masters, 3 slaves) using JedisCluster. How should I set up the configuration files for the nodes of the cluster?
Does JedisCluster methods are sufficient to set up the cluster?
JedisCluster is to communicate with Redis cluster.
First, you have to set up Redis cluster on your own. There are several resources (tutorials, blogs, etc.) are available online. Google for those. To begin, you can take a look into Redis cluster tutorial.
After setting up, you can communicate with that Redis cluster by JedisCluster (as well as many other ways).