Disclaimer: I know that what I’m about to ask is not even close to best practices but due to very specific requirements, I see this as probably one of very few solutions.
Context:
We wish to replicate the Production environment entirely for stress, load, functional and integration testing.
We have done the necessary deployments for development, in a similar version of the Production environment VM (RHEL6), Apache 2.4, Tomcat 6, Java 1.6 and MySQL 5.1; also builds and the databases were replicated for each server of the infrastructure for development.
Now we would like to be able to replicate the flow of requests that Apache receives throughout the day. To maintain the complex distribution of request types, we thought it might be possible to record the requests Apache receives in a particular time frame on production environment and replay it in our testing environment. And if possible, to scale that distribution (for example 100 times) or loop it as well.The question is:
Is there any method to accomplish this, preferably on Apache level or even applicational, knowing that each environment can only communicate with SSH (This might not be permanent) and firewall is blocking them from communicating, as they belong to different organizations (burocraty is a ****). But exceptions can be made to the last two if strictly necessary.
Also it is not crucial for the process to have up-to-date replications or have a superfast process.So, what would be the best solution that fit these requirements?
Answer
The answer is specific for Apache JMeter – the most popular free and open source load testing tool
- JMeter comes with Access Log Sampler which can be used to parse web server logs and create HTTP Requests basing on the log files
- Alternatively you can
- capture network traffic with tcpdump
- convert it to JMeter script format
- replay with increased number of virtual users
Attribution
Source : Link , Question Author : CMPSoares , Answer Author : Dmitri T