0

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.

4
  • Are you just trying to dump the traffic or are you actually intending to send it to an HTTP server etc? Mar 28, 2016 at 17:00
  • Send it to an HTTP server Mar 28, 2016 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, 2016 at 18:09
  • Preferably yes. But I think monitoring the log will also suffice. Thanks for the suggestion. @Tim Mar 29, 2016 at 3:35

2 Answers 2

0

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.

-1

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.

4
  • 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, 2016 at 19:39
  • He says he wants to send it to a 2nd HTTP server in his remark. Mar 28, 2016 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. Mar 29, 2016 at 3:45
  • Easy enough to mirror incoming tcp traffic on port 80, assuming it's not encrypted. Look at netcat ("nc") . Mar 30, 2016 at 19:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .