Re: sunionstore with cluster server

99 views
Skip to first unread message

Josiah Carlson

unread,
Jul 19, 2012, 1:14:04 PM7/19/12
to redi...@googlegroups.com
On Thu, Jul 19, 2012 at 8:34 AM, Mehdi Mehni
<mehdi...@viralninjas.com> wrote:
> Hi
> Can I use sunionstore with cluster server?

Yes.

> I have 2 redis servers; my first key is stored on server1 and the next one
> on server2. Can I make sunionstore in this case?

No.

> I use Predis, and I have a error with : Cannot send 'SUNIONSTORE' commands
> to a cluster of connections.

Are you using the unreleased Redis Cluster, or are you just using sharding?

Regards,
- Josiah

Mehdi Mehni

unread,
Jul 19, 2012, 1:33:00 PM7/19/12
to redi...@googlegroups.com
No I use just 2 Redis servers V2.4.15 (Master-Master) with Predis :
$redis = Predis\Client::create(
    array('host' => '10.0.0.1'), 
    array('host' => '10.0.0.2')
);

Sorry about a confusion, I don't use Redis Cluster yet

Yiftach Shoolman

unread,
Jul 19, 2012, 4:01:41 PM7/19/12
to redi...@googlegroups.com
AFAIK - union/intersect commands across shards are currently not planned to be  part of the first release of the Redis cluster

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To view this discussion on the web visit https://groups.google.com/d/msg/redis-db/-/OOOmymOnxg0J.

To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.



--
Yiftach Shoolman
+972-54-7634621

Mehdi Mehni

unread,
Jul 19, 2012, 6:10:52 PM7/19/12
to redi...@googlegroups.com
Sorry about a confusion, I don't use Redis Cluster, I use 2 Redis servers V2.4.15 with Predis like :  
$redis = Predis\Client::create(
    array('host' => '10.0.0.1'), 
    array('host' => '10.0.0.2')
);

To unsubscribe from this group, send email to redis-db+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.



--
Yiftach Shoolman
+972-54-7634621

Josiah Carlson

unread,
Jul 20, 2012, 1:29:34 AM7/20/12
to redi...@googlegroups.com
Non-Redis cluster servers do nothing to support nor prevent sharding
like you are doing. As such, it does nothing to support cross-shard
set operations. Further, even later when Redis cluster comes out,
Redis cluster will also *not* support cross-machine set operations.
You could explicitly migrate your data between shards with the control
commands, but that will be expensive.

Generally speaking, you can only perform set/zset or sort+by/get on
data that is on the same server. This is by design, and I would wager
is very unlikely to change.

Regards,
- Josiah

On Thu, Jul 19, 2012 at 10:33 AM, Mehdi Mehni
<mehdi...@viralninjas.com> wrote:
> No I use just 2 Redis servers V2.4.15 (Master-Master) with Predis :
>
> $redis = Predis\Client::create(
> array('host' => '10.0.0.1'),
> array('host' => '10.0.0.2')
> );
>
>
> Sorry about a confusion, I don't use Redis Cluster yet
>
> Le jeudi 19 juillet 2012 13:14:04 UTC-4, Josiah Carlson a écrit :
>>
>> On Thu, Jul 19, 2012 at 8:34 AM, Mehdi Mehni
>> <mehdi...@viralninjas.com> wrote:
>> > Hi
>> > Can I use sunionstore with cluster server?
>>
>> Yes.
>>
>> > I have 2 redis servers; my first key is stored on server1 and the next
>> > one
>> > on server2. Can I make sunionstore in this case?
>>
>> No.
>>
>> > I use Predis, and I have a error with : Cannot send 'SUNIONSTORE'
>> > commands
>> > to a cluster of connections.
>>
>> Are you using the unreleased Redis Cluster, or are you just using
>> sharding?
>>
>> Regards,
>> - Josiah
>
> --
> You received this message because you are subscribed to the Google Groups
> "Redis DB" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/redis-db/-/OOOmymOnxg0J.
>
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to
> redis-db+u...@googlegroups.com.

Mehdi Mehni

unread,
Jul 20, 2012, 7:26:56 AM7/20/12
to redi...@googlegroups.com
ok, it makes sense.
So before to use a SUNIONSTORE I have to make a sure that my keys are on the same server.

Thank's
> redis-db+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages