Z
Z
Zerstoren2013-03-14 20:27:56
Nginx
Zerstoren, 2013-03-14 20:27:56

Permanent tunnel connection to the proxied server?

In general, such a situation.
There is nginx, which proxies some of the requests to my python server, which is spinning on a specific port.
When nginx accepts a connection from a client, nginx proxies data to my server (opens a connection, writes data to me, reads the response, and closes the connection).
So, how can I make it so that it does not close the connection to my server while the connection to the client is active?
This is necessary due to the fact that when opening and closing the connection there is some extra load, which is very undesirable.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rowdy Ro, 2013-03-14
@Zerstoren

If I correctly understood that:
syntax: keepalive connections;
default: -
context: upstream
This directive appeared in version 1.1.4.
or in the case of fastcgi
server {
...
location /fastcgi/ {
fastcgi_pass fastcgi_backend;
fastcgi_keep_conn on;

}
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question