goduplicator

goduplicator is a tcp proxy that can mirror data to other servers

  • 所有者: mkevac/goduplicator
  • 平台:
  • 许可证: MIT License
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

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

主要指标

概览
名称与所有者mkevac/goduplicator
主编程语言Go
编程语言Go (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2015-09-04 12:26:22
推送于2020-12-08 18:11:43
最后一次提交2020-12-08 21:11:37
发布数4
最新版本名称v0.2.2 (发布于 )
第一版名称goduplicator-0.0.1 (发布于 )
用户参与
星数150
关注者数11
派生数27
提交数36
已启用问题?
问题数6
打开的问题数3
拉请求数2
打开的拉请求数0
关闭的拉请求数1
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?