GoReplay is the simplest and safest way to test your app using real traffic before you put it into production.
As your application grows, the effort required to test it also grows exponentially. GoReplay offers you the simple idea of reusing your existing traffic for testing, which makes it incredibly powerful. Our state of art technique allows to analyze and record your application traffic without affecting it. This eliminates the risks that come with putting a third party component in the critical path.
GoReplay increases your confidence in code deployments, configuration changes and infrastructure changes. Did we mention that no coding is required?
Here is basic workflow: The listener server catches http traffic and sends it to the replay server or saves to file. The replay server forwards traffic to a given address.
大概意思就是:goreplay是一款从生产环境copy流量到测试环境的工具,且不会影响生产环境的业务相应,又能很简单的达到复用http请求来进行稳定性测试 的目的;
使用方法
这个工具可以直接从github上下载成品,如果你的服务器是centos7以上,应该可以直接解压后使用;
解压后只有一个文件:goreplay
他会依赖两个系统库,一般系统已经预置,如果没有,可以手动安装,详见这里:
简单的场景下,这个工具使用方法非常简单
sudo ./goreplay执行
example:将请求到本机80端口的http请求,毫无变化的转发到192.168.100.100的1234端口上
./goreplay --input-raw :80 --output-http="http://192.168.100.100:1234"
优缺点
这个工具相比之前接触的一些工具的优点在于,在centos7以上的机器上不需编译或安装有内存或cpu消耗的程序,拷贝过来就可以直接使用;
缺点是这类工具的通病,需要操作生产环境服务器;
但是有需要 快速验证服务稳定性 需求的话,还是非常方便的;
Python软件开发测试交友群QQ:952490269(加群备注software),欢迎加入!
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!