Is it possible to mirror the HTTP Traffic to a separate server to perform independent process (no response needed) while at the same time serving the original requests?

Preferably I would like to do it using built in directives from nginx. Something like this.

  • Are you just trying to dump the traffic or are you actually intending to send it to an HTTP server etc? – TheFiddlerWins Mar 28 '16 at 17:00
  • Send it to an HTTP server – Brian Bates Mar 28 '16 at 17:16
  • Does it need to be at the same time? You could monitor the log, which are close to real time, or batch them later. – Tim Mar 28 '16 at 18:09
  • Preferably yes. But I think monitoring the log will also suffice. Thanks for the suggestion. @Tim – Brian Bates Mar 29 '16 at 3:35

It may be possible in Nginx with post_action (found using Google search). You could also consider using GOR to do this.

Some kind of log file processing could be simpler, either near realtime or batch.


Not possible. HTTP requires responses both ways, you can't mirror it. If you want to you could duplicate the payloads of the HTTP messages by writing them to a queue and then copying the queue and sending it to multiple places. This is what ActiveMQ/RabbitMQ is all about.

But not just with HTTP itself.

  • I don't think they want two web servers to participate, I think they just want another to get access to the requests. A voyeuristic web server. It doesn't seem particularly complex, though it's unusual so it may require writing code if it has to be done live. – Tim Mar 28 '16 at 19:39
  • He says he wants to send it to a 2nd HTTP server in his remark. – TheFiddlerWins Mar 28 '16 at 19:58
  • I do want to send it to an HTTP server but I dont need the response from the second sever. Tim may have got the idea of what I intended to do. I will also try to take into account @TheFiddlerWins answer by studying the suggested technology. – Brian Bates Mar 29 '16 at 3:45
  • Easy enough to mirror incoming tcp traffic on port 80, assuming it's not encrypted. Look at netcat ("nc") . – TheFiddlerWins Mar 30 '16 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.