0

Is there any way to use like nginx, mod_proxy, haproxy or anything similar to have it proxy requests to two different webservers in parallel?

I have one server that's like a current active, and one that's a "new" and I want to make sure the "new" one works the same as the current "active" one before switching over. So, the proxy should send all requests to both and then ignore replies from the "new" one.

MichaelB
  • 541
  • 4
  • 10

2 Answers2

1

That's an odd way to test a new server. You won't be able to see the results of the requests in say a browser. The tool would have to call both servers and compare the results, pass the response to the caller, and report its results to you somehow.

You're like better off with some kind of automated testing tool, and maybe a load testing tool. JUnit, Selenium, and Helium are examples of testing tools. JMeter and ab (apache benchmark) are useful load testing tools.

There are also ways to replay logs, which might be of some use to you. Google will find options.

Tim
  • 31,888
  • 7
  • 52
  • 78
0

As Tim said, this is definitely not a good way to test a new server. One possible alternative is to rely on haproxy health checks.

Setup a health check page (monitor) in your new server that returns 200 if everything is ok otherwise it will return another HTTP code. Then use the following conf in haproxy: option httpchk /monitor

Mo3m3n
  • 414
  • 2
  • 6