美文网首页
Gor—简单易用的流量回放及复制工具

Gor—简单易用的流量回放及复制工具

作者: 牛海朋 | 来源:发表于2017-03-22 18:48 被阅读0次

基本介绍

Gor是一款用Go语言实现的简单的http流量复制工具,它的主要目的是使你的生产环境HTTP真实流量在开发环境和预演环境(staging server)重现。
工具使用非常简单,只需要下载一个gor文件即可,并同时支持Linux、mac、windows版本。下面是它的工作的流程,监听服务器请求并捕捉http流量,把捕捉到的流量发送到重现服务器上或者保存到文件中,重现服务器再继续把流量发送到一个指定的ip地址。

用法简介

  1. 简单的 HTTP 流量复制
gor –input-raw :80 –output-http “http://staging.com”
  1. HTTP 流量复制频率控制
gor –input-tcp :28020 –output-http “http://staging.com|10″
  1. HTTP 流量复制缩小
gor –input-raw :80 –output-tcp “replay.local:28020|10%”
  1. HTTP 流量记录到本地文件
gor –input-raw :80 –output-file requests.gor
  1. HTTP 流量回放和压测
gor –input-file “requests.gor|200%” –output-http “staging.com”
  1. HTTP 流量过滤复制
gor –input-raw :8080 –output-http staging.com –output-http-url-regexp ^www.
  1. 注入改变请求流量header
gor –input-raw :80 –output-http “http://staging.server”  –output-http-header “User-Agent: Replayed by Gor”   –output-http-header “Enable-Feature-X: true”
  1. 更多用法
gor –help

相关链接

下载

https://pan.baidu.com/s/1jInUaCe
https://github.com/buger/gor/releases

其他资料

http://leonsbox.com/blog/2013/06/04/improving-testing-by-using-real-traffic-from-production/
https://github.com/buger/gor
https://github.com/doubaokun/node-ab
https://github.com/session-replay-tools/tcpcopy
https://github.com/httperf/httperf
https://github.com/buger/gor/blob/master/ELASTICSEARCH.md

相关文章

网友评论

      本文标题:Gor—简单易用的流量回放及复制工具

      本文链接:https://www.haomeiwen.com/subject/fefanttx.html