Redis Cluster - Pipeline Support

1,616 views
Skip to first unread message

neha narayan

unread,
Jun 28, 2015, 3:09:10 PM6/28/15
to redi...@googlegroups.com
Dear All,

Does Redis Cluster supports Pipeline?

If not, can I use Redis Client with pipeline support (Jedis Class instead of JedisCluster Class) to communicate with Redis Cluster. What I meant is that I can use hashtags to put all the related keys in one Redis Cluster node, then discover the specific redis cluster node and send all the request using Jedic Class pipeline feature. Is that feasible?

Thanks,
-Neha

Jan-Erik Rediger

unread,
Jun 29, 2015, 3:42:25 AM6/29/15
to redi...@googlegroups.com
Yep, you can of course still pipeline requests as usual.
If you make sure that all requests are sent to the node serving the
slot, pipelining will work and give you the right results.
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
> To post to this group, send email to redi...@googlegroups.com.
> Visit this group at http://groups.google.com/group/redis-db.
> For more options, visit https://groups.google.com/d/optout.

neha narayan

unread,
Jun 29, 2015, 8:19:00 AM6/29/15
to redi...@googlegroups.com, jan...@fnordig.de
Thanks Janerik. Let me try.

Salvatore Sanfilippo

unread,
Jun 29, 2015, 11:27:42 AM6/29/15
to Redis DB
If you want zero-problems with pipelines in the context of cluster,
make sure to wrap them into MULTI/EXEC unless you can afford certain
things in the pipeline to fail for redirection, due to configuration
changes to the cluster during the time the pipeline is processed. If
you don't use MULTI/EXEC you need to retrieve replies and remember
what of your commands failed in order to retry in the new node.
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to redis-db+u...@googlegroups.com.
> To post to this group, send email to redi...@googlegroups.com.
> Visit this group at http://groups.google.com/group/redis-db.
> For more options, visit https://groups.google.com/d/optout.



--
Salvatore 'antirez' Sanfilippo
open source developer - Pivotal http://pivotal.io

"If a system is to have conceptual integrity, someone must control the
concepts."
— Fred Brooks, "The Mythical Man-Month", 1975.

Pavel Shaydo

unread,
Jun 29, 2015, 5:45:29 PM6/29/15
to redi...@googlegroups.com
On Mon, 29 Jun 2015 17:27:14 +0200
Salvatore Sanfilippo <ant...@gmail.com> wrote:

> If you want zero-problems with pipelines in the context of cluster,
> make sure to wrap them into MULTI/EXEC unless you can afford certain
> things in the pipeline to fail for redirection, due to configuration
> changes to the cluster during the time the pipeline is processed. If
> you don't use MULTI/EXEC you need to retrieve replies and remember
> what of your commands failed in order to retry in the new node.

MULTI/EXEC on cluster currently (I just checked it on 3.0.2) may result
in data loss. The problem is that redis-server checks if keyslot is
served by the node when it queues command, but if after that but before
EXEC slot migrates to another node then EXEC returns OK, but command
doesn't really have any effect. See
https://github.com/antirez/redis/issues/2515 for example.

Amit Mittal

unread,
Jul 22, 2016, 10:59:01 AM7/22/16
to Redis DB
though old thread, but just for the info of others - Looks like the issue with Multi/exec is resolved now.
Reply all
Reply to author
Forward
0 new messages