Giter Club home page Giter Club logo

redis-ha's Introduction

redis-ha

Redis with replication and failover (keepalived)

Overview

This project help you to deploy redis With HA and automatic recovery. A basic cluster is a redis master and a redis slave, slave sync data from master. Only a redis master and a redis slave based on this arch. The project only for redis cache service not support transaction managemant. This program is for Ubuntu 14.04 or later, use redis_ha_installer_el6.py or redis_ha_installer_el7.py instead of CentOS 6/7 if you are using CentOS/RHEL.

How to use?

  • Clone this repo on all of the node:
git clone https://github.com/nofdev/redis-ha.git
  • According to the need to edit the configuration file. The configuration files stored in the following location:

    • redis-ha/conf/keepalived.conf.master
      • This is the keepalived master configuration, you have to edit the VIP.
    • redis-ha/conf/keepalived.conf.backup
      • This is the keepalived backup configuration, you have to edit the VIP.
    • redis-ha/conf/redis.conf.master
      • This is the redis master configuration.
    • redis-ha/conf/redis.conf.slave
      • This is the redis slave configuration.
    • redis-ha/tools/redis.sh
      • This is the fail-over script invoked by keepalived, you have to edit the redis master ip.
  • To deploy the master node:

sudo python redis_ha_installer.py master
  • To deploy the backup node(s):
sudo python redis_ha_installer.py backup

Note

  • Please use the stable version.

###About the redis.sh script

  • On the master node, set the REDIS_MASTER_IP as slave IP.
  • On the slave node, set the REDIS_MASTER_IP as master IP.

Using docker

  • Please deploy docker daemon on your server.
  • Choose your correct Docker file and rename it to Dockerfile.
  • Using docker build -t user/repo:tag to build your image.

Author

jiasir (Taio Jia) [email protected]

Change log

2014.12.20 - Add support for the docker. 2014.10.28 - Change the redis configuration settings, compatible with the version 2.8.17 and resoled the soft and hard limits.

redis-ha's People

Contributors

taiojia avatar

Stargazers

Isaac Rodman avatar Igor Kudrin avatar Boaz avatar  avatar

Watchers

 avatar Richard avatar James Cloos avatar  avatar  avatar

Forkers

spops

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.