1

We are trying to figure out if we can copy each http request coming in to our tomcat production server and send it to a development test server to get a real simulation of the production traffic. The original request handling should not have any impact. The production server need not wait for a response for the copied request from the development server.

Is there a simple way to do this?

2 Answers 2

3

If you really want to do it live, what I'd recommend is to put a Http Servlet Filter in front of your production webapp. In this filter, copy the request data into a new request and send it (asynchronously) to your development server. This way, at least you don't have to modify your application code.

But it think you should try to avoid doing that in a production environment. Instead, you could dump the request data (see Istvan answer) and do the request from a development machine.

Sign up to request clarification or add additional context in comments.

Comments

2

Not that I know of. Maybe you can setup http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#Request_Dumper_Filter in a way that it sends the logs to a remote server that has some small app playing back the requests based on what's received.

"sends the logs" = configure log4j so that it stores the log on a network share or use socketappender

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.