Hello!
How to set up Nginx, so it sent simultaneous requests to different upstream server?
For example:
upstream backend {
server backend1.example.com;
server backend2.example.com;
server backend3.example.com down;
server backend4.example.com;
server backend5.example.com;
server backend6.example.com;
}
And we need to Nginx when requested in 3 parallel query sent to the backend: backend1.example.com, backend2.example.com, backend4.example.com.
Then, if backend2.example.com returned an error, the request was forwarded to backend5.example.com.
If one of the three queries successfully completed, the client receives the quickest response.
The goal - do not waste time repeating the request to the next server from upstream.