Forum: NGINX Creating One-way connections or Dont wait for upstream

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.
2974d09ac2541e892966b762aad84943?d=identicon&s=25 wojonstech (Guest)
on 2013-08-16 12:33
(Received via mailing list)
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:
http://forum.nginx.org/read.php?2,241919,241919#msg-241919
56080a668b706e94fb2bbe9ee727d006?d=identicon&s=25 Reinis Rozitis (Guest)
on 2013-08-16 14:17
(Received via mailing list)
> 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 (
http://nginx.org/en/docs/http/ngx_http_proxy_modul...
 ) - 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 ( http://wiki.nginx.org/HttpEchoModule )
from
http://openresty.org/

rr
This topic is locked and can not be replied to.