Code Monkey home page Code Monkey logo

roxy's Introduction

roxy

This redis protocol service will act as a redis service and mirror the commands between two redis servers. Used for zero downtime migration.

Through mirroring we can we can migrate between Redis instances without downtime when replication is not an option (e.x ElasticCache), or do capacity check in a safe way. Commands will mirror in the second redis in an async and non-fatal way.

Diagram

alt text

Demo

Note: you will only need docker to test the setup

# Start the main redis server
$ docker run --rm --name redis-main -p 6379:6379 redis
# Start the mirror redis server
$ docker run --rm --name redis-mirror -p 6381:6379 redis

# complile and run the mirror service in docker
$ docker run -ti --rm -v $PWD/:/ws --workdir /ws -p 6380:6380 golang:1 go run *.go \
     -redis1 host.docker.internal:6379 -redis2 host.docker.internal:6381 -addr :6380


# connect to the redis-mirror service (6380)
$ docker run -ti --rm --entrypoint /usr/local/bin/redis-cli redis -h host.docker.internal -p 6380 SET KEY VAL
OK
$ docker run -ti --rm --entrypoint /usr/local/bin/redis-cli redis -h host.docker.internal -p 6380 GET KEY
"VAL"

# check the value in the main server
$ docker run -ti --rm --entrypoint /usr/local/bin/redis-cli redis -h host.docker.internal -p 6379 GET KEY
"VAL"
# check the value in the mirror server
$ docker run -ti --rm --entrypoint /usr/local/bin/redis-cli redis -h host.docker.internal -p 6381 GET KEY
"VAL"

roxy's People

Contributors

kavehmz avatar thibault-deriv avatar kaveh-deriv avatar

Watchers

 avatar Kostas Georgiou avatar

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.