Duplicate the client's requests to another server

Hello,

When nginx pass the client’s request to an original server, I want it
always duplicate the request to another webserver.

For example, the request is following: client -> nginx ->
original-server
What I want is:

client -> nginx -> original-server
|-> another webserver

The request should always be duplicated, rather than the round robin.

How can I do that?

Thanks.

Jeff,

I can’t think of a (simple) way of doing this through NGINX.

It seems to me that the simplest might be to handle this on iptables
(are
you using Linux?) directly by setting up something similar to what’s
covered here:

http://www.bjou.de/blog/2008/05/howto-copyteeclone-network-traffic-using-iptables/

so your destination would be some sort of an alias that actually
represents
2 destinations.

Would you be able to provide more context about your environment and why
you are thinking of implementing that?


Unai R.
CTO & Cofounder
LeanWired LLP
Singapore 168977
www.leanservers.com
[email protected]

On Thu, Dec 22, 2011 at 2:52 PM, Unai R. [email protected]
wrote:

Would you be able to provide more context about your environment and why you
are thinking of implementing that?

Thanks.
I just need the incoming data to the second server for testing and
analyzing, since the original-server is in production environment.

All the servers are Ubuntu Linux 9.10 OS.

Jeff,

Thanks.

I just need the incoming data to the second server for testing and
analyzing, since the original-server is in production environment.

All the servers are Ubuntu Linux 9.10 OS.


nginx mailing list
[email protected]
nginx Info Page

I have never seen/encountered this scenario you are describing. Although
it
looks interesting, I’m not sure I understand its benefits. What are your
trying to achieve? I mean, if you hit an error on production, you will
have
to troubleshoot it anyway, right? I guess you can always analyze using
the
logs on production.