which proxy is best for Redis 3.0 Cluster?

4,536 views
Skip to first unread message

Amolak Gill

unread,
Apr 16, 2015, 10:30:12 AM4/16/15
to redi...@googlegroups.com
Hello All,
This is my first time setting up a redis cluster 3.0 cluster.
I have setup it up with 3 masters and 3 slaves. Its working perfectly fine, failover works fine too. But I am not sure which proxy to use in the front. I considered twemproxy, but not really sure how its gonna work with redis. 
I want something that receives the request from the client, makes a get request to the right node which is holding the data and then serve it to the client. Also it detects if there is a failover and automatically send requests to the new master node instead of the old master. Can anyone please help? 

zohaib butt

unread,
Apr 16, 2015, 12:07:17 PM4/16/15
to redi...@googlegroups.com
I am actually trying to find a solution myself... i dont think a twemproxy would be ideal since it does sharding... and redis cluster essentially takes care of that... need a load balance solution i guess that detects when a slave is promoted to master? ... looking to see if its possible with haproxy i guess.

Amolak Gill

unread,
Apr 16, 2015, 12:40:13 PM4/16/15
to redi...@googlegroups.com
Thats exactly what I am looking for. with redis handling sharding, we dont need twemproxy to handle that. Also, twemproxy needs sentinel, which is not required for failover in redis cluster anymore.
btw, I am looking into codis.
https://github.com/wandoulabs/codis

zohaib butt

unread,
Apr 16, 2015, 12:52:36 PM4/16/15
to redi...@googlegroups.com
that looks like an alternative to twemproxy? ... we use php applications ... some of the php clients have support for clustering... although they dont have master/slave failover support built in yet. I am still reading and trying to figure out... will report if i come up with a good solution.

zohaib butt

unread,
Apr 16, 2015, 3:25:11 PM4/16/15
to redi...@googlegroups.com
found something ... https://github.com/falsecz/haredis ... going to test it out shortly and see if it works as expected.

Z

Amolak Gill

unread,
Apr 16, 2015, 3:31:56 PM4/16/15
to redi...@googlegroups.com
codis is just an alternative to twemproxy. didnt get a chance to test it out. 
I looked at haredis. Not sure if this can do the job. It uses sentinel to trigger failover. Also, i think it works only with 1 master. Anyways, I could be wrong so let me know did your test go.

The Baldguy

unread,
Apr 17, 2015, 1:16:40 AM4/17/15
to redi...@googlegroups.com
As long as you understand that you will need a proxy for *every* m/s pair, HAProxy might work with a custom check which doesn't allow connection to an instance with role of slave. I haven't tried that, yet, so be wary until it is shown to work. Otherwise you'd need something which is really an application layer proxy which "speaks redis cluster" in order to serve as a transparent proxy. As far as I know nobody has yet written one, but it is on my todo list. This is required because redis essentially issues a redirect if the key doesn't live on the host you connected to and if all your redis instances in the cluster are behind a single proxy which doesn't understand and track them it won't work.

As far as Codis goes, I did quite the exploration of it and posted a summary of my findings at http://www.iamtherealbill.com/2015/04/clusterizing-redis-codis/

It looks very promising, but has some key issues to resolve.

Amolak Gill

unread,
Apr 17, 2015, 9:32:29 AM4/17/15
to redi...@googlegroups.com
Thanks The Baldguy for your response. I guess we will have to wait until a proxy is built for redis 3.0. I went through your Codis article as well, it is a very indepth article. After reading it I am kind of afraid to use codis in production as of now. I believe it is not production ready yet. 
I will continue to test other solutions and post my findings here. Thanks again for replying. :)

Andrei Chiriaev

unread,
Aug 25, 2015, 7:48:23 AM8/25/15
to Redis DB
Hi, Amolak. Any luck? I am looking for a similar thing. Regards, Andrei

mohammad...@bedigital.co.id

unread,
Sep 1, 2015, 6:16:31 AM9/1/15
to Redis DB
Hi Amolak,

I am also looking for this solution. pls share if you have any updates.

Rgrds,
MLM

Josiah Carlson

unread,
Sep 3, 2015, 12:13:37 AM9/3/15
to redi...@googlegroups.com
There is an operating assumption that your Redis client should be smart enough, eventually, to offer the ability to connect to the right Redis server for the right key. It wouldn't be impossible to create a proxy to do this, though I haven't looked for, and am personally unaware of such a proxy.

What clients are you all using? Have they not received Redis Cluster love?

 - Josiah


--
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.

coo...@yahoo-inc.com

unread,
Dec 3, 2015, 1:22:44 AM12/3/15
to Redis DB
I find it very odd that there is still no obvious smart proxy for Redis Cluster that caches the hash results.  Maybe our architecture is more complex than others???  Is everyone just cacheing their hash results right on their clients?  If you have any more than a single Redis client isn't that inefficient?  If the clients could somehow share hash information that would be ideal, but I suppose that would end up being yet another layer of gossiping among the proxies/clients.  This is something about Redis Cluster that I just never quite understood and why we haven't migrated fully to it yet.

santho...@securifi.com

unread,
Jun 29, 2016, 8:46:33 AM6/29/16
to Redis DB
Hii Amolak Gill,
Did you find another load balancer for your task. I am struck at the same point as you.

Amolak Gill

unread,
Jun 29, 2016, 10:37:02 AM6/29/16
to Redis DB
Hey, I had dropped the project as there was no production level proxy i found. I am working on this project again using redis 3.2.1, Will let you know if I find something.

--
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.

For more options, visit https://groups.google.com/d/optout.
--
Kind Regards,

Amolak Gill | Network Administrator | Firmex


110 Spadina Avenue, Suite 700, Toronto, ON M5V 2K4

Akbar Ahmed

unread,
Jun 30, 2016, 12:23:57 AM6/30/16
to Redis DB
Dynomite is a production ready "proxy" for Redis with sharding, replication, token (ie topology) awareness, etc. that uses a standard Redis client:

Amolak Gill

unread,
Jun 30, 2016, 4:30:33 PM6/30/16
to Redis DB
Thanks for the information Akbar. I am trying to make a cluster with 1 master and 2 slaves. And I need a proxy that can loadbalance reads/writes i.e. write to the master and read from the slaves and on top of that be aware who is the master. In case of a failover, proxy should be able to identify the new master/slave and exclude the dead node out of the cluster and start writing to the new master.

From what I checked, Dynomite cant help me achieve this, or did i skip something?

On Thu, Jun 30, 2016 at 12:24 AM Akbar Ahmed <akbar...@dynomitedb.com> wrote:
Dynomite is a production ready "proxy" for Redis with sharding, replication, token (ie topology) awareness, etc. that uses a standard Redis client:

--
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 https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.

Akbar Ahmed

unread,
Jun 30, 2016, 4:35:26 PM6/30/16
to Redis DB
With the architecture you described, no Dynomite would not help.

Where it would help is if you want all nodes to be active/active....where you can write to any node and read from any node. Also, with Dynomite there is no master/slave, all servers are always active. 

For example, if you're running in AWS, you could put 3 nodes in 3 separate availability zones (AZs). This way, you can write to any node, read from any node, and in case of failure, there will be no impact on your ability to serve data.

Dynomite with the Dyno client (also open source) does give you the ability to have the client direct traffic away from a downed node (either due to failure or due to maintenance).

Deepak Dharan Padmini

unread,
Jul 19, 2016, 3:32:12 AM7/19/16
to Redis DB
Amolak, were you able to find a solution ? I am looking for something similar ? I have settled for a cluster instead for now. Is there anyway to do load balancing ?

Amolak Gill

unread,
Jul 19, 2016, 7:10:05 AM7/19/16
to Redis DB
Hey Deepak,
No i wasnt able to find a proper proxy that can handle failovers and loadbalancing.

Akbar Ahmed

unread,
Jul 19, 2016, 1:35:05 PM7/19/16
to Redis DB
Hi Deeepak, Amolak,

What are the specific goals you're trying to achieve?

Is it?
  • High availability (for reads, for writes, or both)
  • Read scalability / Write scalability / or both
  • Is there a reason for a master/slave architecture vs. a shared-nothing architecture?

Akbar



Reply all
Reply to author
Forward
0 new messages