Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
This is a redis-py connection with failover in the event of a connection error, the connection pool is managed with zookeeper. Inspired by redis_failover, use that if you're using ruby, or this if you're using python.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README.md
failover_connection.py

README.md

failover_connection

This is a redis connection with failover in the event of a connection error, the connection pool is managed with zookeeper.

In the event of an connection error, the first connection gets a write lock and elects a new master. Other connections wait until the write lock is released to get the new master.

This is the inital version and it's probably very broken. A number of things are not yet handled properly.

I orignally wrote this using zc.zk and zktools. The currently don't work with gevent though so i've rewritten it to use kazoo. I've tested it with and without gvent and currently use it with both.

I'll do a write up soon about ZooKeeper on the Gravity Four blog.

Something went wrong with that request. Please try again.