This is a creation in Article, where the information may have evolved or changed.
Stress testing tools for common WEB applications
There are many WEB application stress testing tools, such as Apache Ab,node-ab,apache JMeter, LoadRunner, Httperf. But none of these tools can solve a problem:
How to correctly simulate the flow of a production environment
Today's WEB applications have a very complex architecture that contains complex load balancing, service, and RPC call relationships, simple send get requests to certain URLs or API interfaces to completely simulate real traffic. If you play back the HTTP log, the operation is extremely troublesome. Although the tcpcopy can replicate real-time traffic, the operation is also complex. The previous migration of the Amazon cloud platform used the Gor tool.
Gor is the perfect solution for stress testing in WEB applications
I've been looking for a simple and convenient solution until I find Gor. Gor is an HTTP real-time traffic replication tool written in Golang. Simply executing a process on the LB or Varnish Portal Server allows you to copy the traffic from the production environment to any location, such as the Staging environment and the DEV environment. Perfectly solves the problem of HTTP layer real-time traffic replication and stress testing.
Features of the Gor
Gor supports the amplification and reduction of traffic and the frequency limit so that it does not require a consistent server cluster for the build and production environment to be tested correctly. Gor also supports filtering traffic based on regular expressions, which means that an API service can be tested separately. You can also modify HTTP request headers, such as replacing user-agent, or adding some HTTP headers.
Gor can also log requests to files for playback and analysis. Gor supports and ElasticSearch integration, storing traffic in ES for real-time analysis.
Common commands for Gor
Simple HTTP Traffic Replication:
Gor–input-raw:80–output-http "Http://staging.com"
HTTP Traffic Replication Frequency control:
Gor–input-tcp:28020–output-http "Http://staging.com|10″
HTTP traffic replication shrinks:
Gor–input-raw:80–output-tcp "replay.local:28020|10%"
HTTP traffic is logged to a local file:
Gor–input-raw:80–output-file Requests.gor
HTTP traffic replay and voltage test:
Gor–input-file "requests.gor|200%" –output-http "staging.com"
HTTP Traffic Filtering replication:
Gor–input-raw:8080–output-http staging.com–output-http-url-regexp ^www.
At last
This Golang write Gor is open source, meaning can be easily integrated into their own architecture, can be used in the pressure test platform, real-time traffic analysis, application layer firewall and so on.
Project Address
Https://github.com/buger/gor
http://leonsbox.com/blog/2013/06/04/improving-testing-by-using-real-traffic-from-production/
The installation Gor on Windows is not the same as Linux, because my organization uses Windows Server R2, so specifically, for everyone to use later:
1. Under Windows, first install the WinPcap download address: https://www.winpcap.org/install/default.htm
2. Then download the Gor binary file on the GOR website and copy it to Windwos (e.g. c:/windows)
3. Run the Gor--input-raw:80--output-http http://192.168.1.109 command.