# Creating One-way connections or Dont wait for upstream

**URL:** <https://www.ruby-forum.com/t/creating-one-way-connections-or-dont-wait-for-upstream/246011>\
**Category:** NGINX\
**Created:** [August 16, 2013, 12:33pm UTC](https://www.ruby-forum.com/t/creating-one-way-connections-or-dont-wait-for-upstream/246011 "2013-08-16T12:33:24Z")\
**Posts on this page:** 2\
**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:** [August 16, 2013, 12:33pm UTC](https://www.ruby-forum.com/t/creating-one-way-connections-or-dont-wait-for-upstream/246011/1 "2013-08-16T12:33:24Z")

</div>

Hello,

I am working on an application where http ( websocket, or any type of  
connection) connections will be one direction for inserting data into a  
database and queuing data. The client side of the application does not  
care  
about the response from nginx. It would be acceptable to send a blank  
response or send no database at all and simple just close the  
connection.  
After or as the connection is closed I would like the data to work  
internal  
within nginx as normal selecting an upstream proxying it, if the  
upstream  
timeouts or has an error still be able to use nginx\_next\_upstream.

What would a configuration like this look like?

Thank you in advance.

Posted at Nginx Forum:

> **[Creating One-way connections or Dont wait for upstream](https://forum.nginx.org/read.php?2,241919,241919#msg-241919)**
>
> Hello, I am working on an application where http ( websocket, or any type of connection) connections will be one direction for inserting data into a database and queuing data. The client side of the application does not care about the response from...

---

<div class="post-metadata">

**Author:** ![wojonstech](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/c68b51/32.png) [@wojonstech](https://www.ruby-forum.com/u/wojonstech)\
**Post date:** [August 16, 2013, 2:17pm UTC](https://www.ruby-forum.com/t/creating-one-way-connections-or-dont-wait-for-upstream/246011/2 "2013-08-16T14:17:49Z")

</div>

> The client side of the application does not care about the response from  
> nginx. It would be acceptable to send a blank  
> response or send no database at all and simple just close the  
> connection.  
> After or as the connection is closed I would like the data to work  
> internal  
> within nginx as normal selecting an upstream proxying it, if the  
> upstream  
> timeouts or has an error still be able to use nginx\_next\_upstream.

> What would a configuration like this look like ?

If you can (force) close the connection from client side then you can  
try  
proxy\_ignore\_client\_abort setting (

> **[Module ngx\_http\_proxy\_module](http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_ignore_client_abort)**
>
> The ngx\_http\_proxy\_module module allows passing requests to another server.

) - which will make nginx to complete the request to upstream.

The other approach (more options to “program” nginx) approach could be  
to  
use something like Echo module ( [GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub](http://wiki.nginx.org/HttpEchoModule) )  
from  
[http://openresty.org/](http://openresty.org/)

rr
