Is there any tool by which I can record all the requests/traffic which currently hits my production website and then replay this load on a different environment to check the perf of new environment?
Basically, I want to be able to test the performance of my application on aws cloud and what configuration is required to handle the current load on production if it is migrated to aws.
You could use JMeter’s Access Log Sampler (see also Access log replay for load testing? Jmeter Pitfalls and Competitors).
This would allow you to take the logs from your production server, and replay the traffic against your new server. Not sure about it replicating the exact load profile – real traffic tends to be spread over the day, with peaks and troughs in visits depending on your time zone and your users; it also doesn’t deal with POST requests.
In fact, for any web app that isn’t about retrieving web pages, replayineg historical traffic is likely to be problematic. If users have to log in, for instance, you need to know their passwords; if they browse a product catalogue in an ecommerce site, you need to have the right data to reflect the catalogue as it was when you recorded the log file.
Far more useful, in my view, is to build a performance model based on your current traffic, and understand the peak number of page requests / second you need to be able to support for each (type of) page.
For instance, if you know that today, you have 10K visitors/hour, and you know the most common user journeys, you can build a performance model that equates those 10K users into “login page requests per second”, “product home page requests / second”, “payment page requests/ second”; you can then use a tool like JMeter to model those journeys, and ramp up the load till you exceed your targets.