# Passive health check in stream\_proxy module

**URL:** <https://www.ruby-forum.com/t/passive-health-check-in-stream-proxy-module/244751>\
**Category:** NGINX\
**Created:** [June 7, 2016, 11:04pm UTC](https://www.ruby-forum.com/t/passive-health-check-in-stream-proxy-module/244751 "2016-06-07T23:04:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [June 7, 2016, 11:04pm UTC](https://www.ruby-forum.com/t/passive-health-check-in-stream-proxy-module/244751/1 "2016-06-07T23:04:31Z")

</div>

How does passive health check work in stream\_proxy module? especially  
for  
UDP which is connectionless. How does nginx detect if it is a failed  
connection and retry next?

Thanks!  
Frank

---

<div class="post-metadata">

**Author:** ![fjlj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/e79b87/32.png) [@fjlj](https://www.ruby-forum.com/u/fjlj)\
**Post date:** [June 8, 2016, 12:45am UTC](https://www.ruby-forum.com/t/passive-health-check-in-stream-proxy-module/244751/2 "2016-06-08T00:45:35Z")

</div>

Hi, [HTTP Load Balancing | NGINX Documentation](https://www.nginx.com/resources/admin-guide/load-balancer/)

2016-06-08 0:03 GMT+03:00 Frank L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![fjlj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/e79b87/32.png) [@fjlj](https://www.ruby-forum.com/u/fjlj)\
**Post date:** [June 8, 2016, 1:17am UTC](https://www.ruby-forum.com/t/passive-health-check-in-stream-proxy-module/244751/3 "2016-06-08T01:17:43Z")

</div>

I checked that page before sending the email.  
The “Passive Health Monitoring” section of that page wasn’t clear on how  
nginx would consider a “failed attempt”, especially in case of UDP where  
there is no “handshake”.

On Tue, Jun 7, 2016 at 3:45 PM, Yuriy M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![fjlj](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/e79b87/32.png) [@fjlj](https://www.ruby-forum.com/u/fjlj)\
**Post date:** [June 8, 2016, 11:46pm UTC](https://www.ruby-forum.com/t/passive-health-check-in-stream-proxy-module/244751/4 "2016-06-08T23:46:52Z")

</div>

Hi Frank,

On Tue, Jun 07, 2016 at 04:16:39PM -0700, Frank L. wrote:

> > 2016-06-08 0:03 GMT+03:00 Frank L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> > 
> > > How does passive health check work in stream\_proxy module? especially for  
> > > UDP which is connectionless. How does nginx detect if it is a failed  
> > > connection and retry next?

There are two types of such errors.

If proxy\_responses is not zero, ICMP Destination Unreachable signals a  
UDP  
error. This results in socket read error.

If proxy\_responses is not default, proxy\_timeout expiration is  
considered a UDP  
connection error too.

–  
Roman A.
