Skip to content

Comment on Automatic Redis Failover for Ruby

Comments

So just to clarify, the client code still connects directly to the actual redis instance, it doesn't connect to the failover daemon as a proxy? It would be useful to describe the connection algorithm in the README.

Also, the split of the reads and writes, that's done via opening connections to both the master and slave?

That's right. The client still maintains direct connections with the actual master/slaves. It's only when it fails to connect with one of them that it goes to the failover daemon to ask for the current set of available nodes. The split of the reads/writes is handled by the client, as it knows where to dispatch commands (to master for writes, and to one of the slaves for reads). I'll make this clearer in the README.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.