在 nginx 1.13.4 出的新功能,ngx_http_mirror_module:
The ngx_http_mirror_module module (1.13.4) implements mirroring of an original request by creating background mirror subrequests. Responses to mirror subrequests are ignored.
範例其實就講的還蠻清楚的:
location / { mirror /mirror; proxy_pass http://backend; } location /mirror { internal; proxy_pass http://test_backend$request_uri; }
如果拿 nginx 當 load balancer 的人,可以用這個功能做些事情...