Multiple requests by upstreams
June 20, 2016 05:39AM

How to set up Nginx, so it sent simultaneous requests to different upstream server?

For example:
upstream backend {
     server down;

And we need to Nginx when requested in 3 parallel query sent to the backend:,,
Then, if returned an error, the request was forwarded to

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.
Re: Multiple requests by upstreams
June 20, 2016 05:47AM
You might be able to code this with Lua, but this should work as well:

server; weight=1 fail_timeout=5;
server; weight=1 fail_timeout=5;

nginx for Windows
Re: Multiple requests by upstreams
June 20, 2016 06:09AM
Thank you!
Which configuration should be written on all the upstream servers?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 296
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready