keepalive seems not to work

Łukasz Tasz lukasz at tasz.eu
Thu Oct 8 09:35:37 UTC 2020


Hi all,

can I expect that proxy_pass will keep connection to remote server that is
being proxied?

when I'm using setup client -> proxy -> server it looks to work
but when I'm using:
client -> 1stProxy_upstream -> proxy -> server
connection between 1stProxy and proxy is being kept thanks to keepalive
100, but proxy makes new connection every new request, very simple setup:

http {
  server {
    listen 8080;
    location / {
      keepalive_disable none;
      keepalive_requests 1000;
      keepalive_timeout 300s;
      proxy_cache proxy-cache;
      proxy_cache_valid 200 302 301 30m;
      proxy_cache_valid any 1m;
      proxy_cache_key $scheme://$http_host$request_uri;
      proxy_pass $scheme://$http_host$request_uri;
      proxy_http_version 1.1;
      proxy_set_header Connection "";
    }
  }
}
I would expect that when client connects proxy and it works then it should
also works when proxy connects upstream proxy....

any ideas?
thanks in advance

Łukasz Tasz
RTKW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20201008/f696242f/attachment.htm>


More information about the nginx mailing list