added support for redis master/slave setup