We are trying to use Nginx's module ngx_http_mirror_module to mirror traffic to a new webserver of ours.
This seems to lead to latency problem on our prod webserver. After X hours of turning on mirroring, we observe Nginx error logs "2018/07/25 15:55:54 [error] 20#0: *12190535 upstream timed out (110: Connection timed out) while sending to client, client: 10.128.0.37, server: , request: "POST /v1/query?v=20170712 HTTP/1.1", upstream: "http://10.3.248.222:8080//api/query?v=20170712", host: "loadtest.xxx.yyy".
I am speculating that ngx_http_mirror_module may be holding onto both the TCP connection to the original upstream, as well as a connection to the mirroring destination.
Hence, I would like to know how to make Nginx mirror module not wait for response. Or, how to close open sockets to original upstream.
Appreciate any insights!