Nginx 的流量镜像模块
Nginx的流量镜像模块
Nginx发布了1.13.4版本,并且包含了一个流量镜像的模块ngx_http_mirror_module。
这对于线上系统就很好了,比如可以镜像部分流量来做测试、debug之类的
例子也很简单:
location / {
mirror /mirror;
proxy_pass http://backend;
}
location /mirror {
internal;
proxy_pass http://test_backend$request_uri;
}
在线阅读本文 Guixing's Jail https://blog.khsing.net/2017/08/nginxs-mirror-module.html