I need to duplicate/mirror the traffic comming to my server.
I mean, I have N backend servers A1 A2 ... An(n>=2) and a nginx as reverse-proxy&load-balancer.
All the traffic comming to Nginx redirect to both Ax and Ay(x!=y) in parallel, if one of the server is down(timeout or 5xx), then the other server's response can be used immediately and return the result to the client.
By mirroring the traffic(not retry but send the duplicated requests in parallel), I can create redundancy, it means more than one backend servers can process one request at the same time.
I need to response to the client within 30ms, if set retries=1, the timeout must set to 15ms(hard to archive), so mirror the traffic can be a solution.
Is it possible?