Forum: NGINX Does it possible to submit duplicated request with the proxy_next_upstream on

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
8744753ffc61206e1057cfe88232e014?d=identicon&s=25 "任勇全" <renenglish@gmail.com> (Guest)
on 2014-01-03 16:04
(Received via mailing list)
Hi all:
I am wondering if I set:
    proxy_next_upstream error timeout;
Fox example , if the requested service is a counter , I issue the
request use the interface http://example.com/incr . The request is
failed on my first host A, then it is passed to the second host B , is
the counter likely be added twice ?

thanks .
8744753ffc61206e1057cfe88232e014?d=identicon&s=25 Shafreeck Sea (Guest)
on 2014-01-14 09:53
(Received via mailing list)
Can any one help ?


2014/1/3 ȫ <renenglish@gmail.com>
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2014-01-14 22:56
(Received via mailing list)
Unless the request is getting que'd while there is a short wait for host
A
to get online AND fail-over is also happening, its not likely to be
added
twice.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,245979,246388#msg-246388
8744753ffc61206e1057cfe88232e014?d=identicon&s=25 任勇全 (Guest)
on 2014-01-16 10:20
(Received via mailing list)
Sorry I cant get it .

If host A has added the counter and failed to response, the request
would be failed over to host B with successful response, so the counter
would be added twines. Wouldnt it ?
 2014114գ5:48itpp2012 <nginx-forum@nginx.us> д
2974d09ac2541e892966b762aad84943?d=identicon&s=25 itpp2012 (Guest)
on 2014-01-16 13:00
(Received via mailing list)
renenglish Wrote:
-------------------------------------------------------
> Sorry I can’t get it .
>
> If host A has added the counter and failed to response, the request
> would be failed over to host B with successful response, so the
> counter would be added twines. Wouldn’t it ?

Then a condition must occur where host A fails right after processing
the
request, they usually fail before accepting a request, it also depends
on
the timeout for a request. And it also depends what nginx considers a
fail,
nginx might not fail a host when it does not return from accepting a
request.

You will have to simulate this to find out the conditions for a fail.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,245979,246505#msg-246505
8744753ffc61206e1057cfe88232e014?d=identicon&s=25 Shafreeck Sea (Guest)
on 2014-01-17 04:25
(Received via mailing list)
OK. Thank you very much . I will do an experiment to find out this


2014/1/16 itpp2012 <nginx-forum@nginx.us>
This topic is locked and can not be replied to.