# Does it possible to submit duplicated request with the proxy\_next\_upstream on

**URL:** <https://www.ruby-forum.com/t/does-it-possible-to-submit-duplicated-request-with-the-proxy-next-upstream-on/238322>\
**Category:** NGINX\
**Created:** [January 3, 2014, 4:04pm UTC](https://www.ruby-forum.com/t/does-it-possible-to-submit-duplicated-request-with-the-proxy-next-upstream-on/238322 "2014-01-03T16:04:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [January 3, 2014, 4:04pm UTC](https://www.ruby-forum.com/t/does-it-possible-to-submit-duplicated-request-with-the-proxy-next-upstream-on/238322/1 "2014-01-03T16:04:17Z")

</div>

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](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 .

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 14, 2014, 9:53am UTC](https://www.ruby-forum.com/t/does-it-possible-to-submit-duplicated-request-with-the-proxy-next-upstream-on/238322/2 "2014-01-14T09:53:09Z")

</div>

Can any one help ?

2014/1/3 ȫ [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 14, 2014, 10:56pm UTC](https://www.ruby-forum.com/t/does-it-possible-to-submit-duplicated-request-with-the-proxy-next-upstream-on/238322/3 "2014-01-14T22:56:02Z")

</div>

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:

> **[Re: Does it possible to submit duplicated request with the...](https://forum.nginx.org/read.php?2,245979,246388#msg-246388)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 16, 2014, 1:00pm UTC](https://www.ruby-forum.com/t/does-it-possible-to-submit-duplicated-request-with-the-proxy-next-upstream-on/238322/4 "2014-01-16T13:00:43Z")

</div>

## 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:

> **[Re: Does it possible to submit duplicated request with the...](https://forum.nginx.org/read.php?2,245979,246505#msg-246505)**
>
> 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...

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 17, 2014, 4:25am UTC](https://www.ruby-forum.com/t/does-it-possible-to-submit-duplicated-request-with-the-proxy-next-upstream-on/238322/5 "2014-01-17T04:25:24Z")

</div>

OK. Thank you very much . I will do an experiment to find out this

2014/1/16 itpp2012 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [January 16, 2014, 10:20am UTC](https://www.ruby-forum.com/t/does-it-possible-to-submit-duplicated-request-with-the-proxy-next-upstream-on/238322/6 "2014-01-16T10:20:38Z")

</div>

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 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) д
