Question

I am trying out a new REST service which implements the functionality of a REST service that we already have in place, just more efficiently.

So as to check that everything is working correctly before putting it live I would like to split the incoming HTTP requests to:

  1. The current system (so that this is transparent to the user) and have responses go from here.
  2. My new system and have responses go back to the proxy but no further.

Then, log requests and responses from both systems so that I can compare the two log files and be sure that they are the same (except for timestamps, session IDs, etc.)

mod_proxy and mod_rewrite seem to be based (reasonably) on one web server responding to each request even if there are multiple webservers load-balancing many requests.

Was it helpful?

Solution

I have Google'd this to death and find there is no facility in mod_proxy for it at the moment. There are three (one unanswered) questions in the Apache Httpd User mailing lists about this here and here suggesting that Httpd doesn't have this functionality and it is not available out-of-the-box elsewhere. I'm going to have a go at writing it using a Servlet. It won't be the fastest but this is only for use in the test environment so should be ok.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top