Giter Club home page Giter Club logo

goduplicator's Introduction

goduplicator Build Status

Why you may need this?

You may have production servers running, but you need to upgrade to a new system. You want to run A/B test on both old and new systems to confirm the new system can handle the production load, and want to see whether the new system can run in shadow mode continuously without any issue.

It is similar to another project https://github.com/agnoster/duplicator, but faster on my tests and supports more than one mirror.

How it works?

goduplicator is a reverse proxy. It mirrors the data to all configured servers. The data from main server is sent back, but data from all other servers is ignored.

goduplicator is a TCP proxy, so it does not care which higher level protocol you are using.

Download binary

You can download binary files here: https://github.com/mkevac/goduplicator/releases

Install from source

You would need Go language installed. Just execute this command:

go get github.com/mkevac/goduplicator

Usage

./goduplicator -l ':8080' -f ':8081' -m ':8082' -m ':8083'
-l is a listening address
-f is an address of a main server
-m is an address of a mirror server (there could be more than one)

Comparison to agnoster/duplicator

agnoster/duplicator on my tests gives about 46000 req/sec, while goduplicator gives approximately 76000 req/sec Client and Server used are in test/ directory.

Server:

$ ./goduplicatortestserver

Another server:

$ ./goduplicatortestserver -l ':11001'

goduplicator:

$ ./goduplicator -l ':11002' -f ':11000' -m ':11001'

agnoster/duplicator:

$ duplicator -p 11002 -f 11000 -d 11001

Results for goduplicator:

$ ./goduplicatortestclient -a ':11002'
2015/09/04 20:07:49 71042 req/sec
2015/09/04 20:07:50 76552 req/sec
2015/09/04 20:07:51 76397 req/sec
2015/09/04 20:07:52 76691 req/sec
2015/09/04 20:07:53 76212 req/sec
2015/09/04 20:07:54 76555 req/sec
2015/09/04 20:07:55 76695 req/sec
2015/09/04 20:07:56 76797 req/sec

Results for agnoster/duplicator:

$ ./goduplicatortestclient -a ':11002'
2015/09/04 20:06:25 44803 req/sec
2015/09/04 20:06:26 46850 req/sec
2015/09/04 20:06:27 47002 req/sec
2015/09/04 20:06:28 46966 req/sec
2015/09/04 20:06:29 47248 req/sec
2015/09/04 20:06:30 46897 req/sec
2015/09/04 20:06:31 46590 req/sec

goduplicator's People

Contributors

ansnunez avatar frankmeds avatar gnnng avatar jiayaoqijia avatar mkevac avatar n-canter avatar revolution1 avatar sandipbhoir avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

renlulu

goduplicator's Issues

Allow empty main server and mirror server

There's a requirement that the following options need to be empty

  • -f
  • -m

In fact, even -s is given, there could be 0 addresses in the URL. This case should also be handled

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.