Hi--

I was exploring using auth_request from the ngx_http_auth_request_module,
and I have encountered some unexpected behavior with regard to HTTP
keepalive/connection reuse. I have some configuration that looks roughly
like this:

location = /auth_check {
  proxy_pass_request_body off;
  proxy_set_header Content-Length '';
  proxy_http_version 1.1;
  proxy_set_header Connection '';
  proxy_pass https://upstream_with_keepalive_confugred;
}

location /private {
  auth_request /auth_check;
  proxy_pass http://some_backend;
}

When I make a series of requests to /auth_check, nginx uses an existing
connection as confirmed by tcpdump, but when I make a series of requests to
/private, each /auth_check is closing the TCP connection at the end and
then creating a new one for the following request. In my
particular use-case this leads to approximately double the latency of the
calls that use auth_request. Is this the expected behavior/a known issue
with auth_request/http subrequests in general?

Thank you,
Zach
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-le...@nginx.org

Reply via email to