开发者

Good way to capture/replay sessions from Apache Log?

开发者 https://www.devze.com 2022-12-27 09:34 出处:网络
For performance testing, I would like to capture some traffic from a production server and use that as a basis to replay the request to a test server in order to simulate a realistic load 开发者_如何学

For performance testing, I would like to capture some traffic from a production server and use that as a basis to replay the request to a test server in order to simulate a realistic load 开发者_如何学JAVAin our development environment. These are all stateless queries, so no issues regarding cookies, sessions, etc.

The Apache log timestamps everything down to a 1 second resolution, but that's not fine enough granularity for our peak times. What's the best way to capture more fine-grained timestamps for replay? And is there some ab-like load generating program that can use this data to replicate load?


Use jmeter.

https://serverfault.com/questions/84041/how-can-i-replay-apache-access-logs-back-at-my-servers-to-do-real-world-load-test

http://jmeter.apache.org/usermanual/component_reference.html#Access_Log_Sampler

As far as granularity with timestamps, you're not going to get better than that. However, you can randomize the time slots within jmeter. Even if your production traffic logs show hits every second, you can tell jmeter to speed that up drastically.


You could capture the network data of a production run, parse it, and then use that as a replay mechanism comparing the results of the production run and the test run (where desired). Oren Eini (Ayende Rahien) talks about something quite similar on his blog.

I know that there is (or was) a tool that allowed you to do load/performance testing based on recorded sessions, but I can't find it right now :(.


You can also use BadBoy to capture sessions to replay w/ JMeter: http://www.badboysoftware.biz/docs/jmeter.htm

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号