Opened 6 years ago
Closed 6 years ago
#1237 closed enhancement (fixed)
ability to mirror traffic (like goreplay) without using post_action
|Reported by:||Owned by:|
A lot of us want to mirror traffic from production setups to another server. This is NOT a/b testing - we dont want to split traffic. There's a lot of value in being able to apply production traffic to staging or when you are moving to a new architecture.
Currently, the way to do this is via a specialized tool like goreplay (https://github.com/buger/goreplay https://goreplay.org) or using post_action in nginx - https://roshandawrani.wordpress.com/2016/09/23/can-nginx-mirror-the-http-request-on-multiple-destinations/
using post_action to mirror traffic is actually pretty popular on stackoverflow, but obviously it has its limitations (example only being able to support a single mirror, etc).
It would be awesome if this could be built right into nginx as a proxy directive.
For example, http://nginx.org/en/docs/http/ngx_http_upstream_module.html uses "backup" and "down" as two possible directives. One could also add "mirror" as a directive. This would mean that traffic would be sent to the mirror servers in addition to the normal servers... however, it would not wait for any response of the mirror (like proxy_ignore_client_abort).
Change History (1)
comment:1 by , 6 years ago
|Status:||new → closed|
In 7072:0bb747b2d7cb/nginx the HTTP mirror module was added.
While it provides a different syntax from what is suggested in this ticket, it can be used to solve the issue.