Question: Is there a way to get recorder real network traffic to web server, e.g. from web server logs (Apache), and replay this traffic to either profile web application (in Perl) under real load, or benchmark and compare speed of different implementations before choosing one or the other?

If it matters, webapp is written in Perl, and runs under plain CGI, FastCGI, mod\_perl (via ModPerl::Registry), PSGI (via Plack::App::WrapCGI).

*Crossposted to [Pro Webmasters](https://webmasters.stackexchange.com/questions/5146/how-to-replay-traffic-to-web-server-from-logs-to-profile-benchmark-web-app-unde)*

---

Similar questions on Server Fault:

* [How can I replay Apache access logs back at my servers to do real world load testing?](https://serverfault.com/questions/84041/how-can-i-replay-apache-access-logs-back-at-my-servers-to-do-real-world-load-test)

Answer: 
A quick scan on Google for this yielded an interesting blog entry with subsequent, useful comments are at <http://www.igvita.com/2008/09/30/load-testing-with-log-replay/>. A commenter also mentioned [Tsung by Process-One](http://tsung.erlang-projects.org/) that allows for recording sessions real-time, with the obvious note that you should be able to replay it back. That doesn't help so much with existing Apache access logs though.
If only GET requests are needed and there is no session-tracking implemented via query parameters, then this is possible.

One question: do you want to do it this way because (1) you want to emulate real-world distribution of traffic among your pages or (2) there are too many pages to even consider building any sort of test scripts?