Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this module keep/maintain http connections between nginx and target service? #195

Open
chasehan-atlas opened this issue Jul 14, 2021 · 1 comment

Comments

@chasehan-atlas
Copy link

chasehan-atlas commented Jul 14, 2021

Hey,
I am using this module with nginx as a forward proxy to forward my https requests.

I can see "Proxy-Connection: Keep-Alive" when I followed curl example on README. Does it mean this module would keep http connection until it reaches proxy_connect_connect_timeout value?

My plan is "my service" ------call------->" nginx as forward proxy" -----call----> "Target service". But I am not sure ngx_http_proxy_connect_module would keep http connection between Nginx and the target service or Nginx supports keepalive natively. (From nginx doc, nginx as reverse proxy supports keepalive_requests. Not sure keepalive are also supported after patch this module)

How did I test it:
I built a nginx docker image with this module and run it on my local with port 8088.
Then I use curl command
curl https://github.com/ -v -x 127.0.0.1:8088
After execution, the log shows Closing connection 0 at the end. Then if I run that curl command again, it would establish http porxy tunnel again and it also did TSL handshake.
But if I use curl --next to call same endpoint twice in one command, the second call would re-use http connection. The command looks like this: curl https://github.com/ -Iv -x 127.0.0.1:8088 --next https://github.com/ -Iv -x 127.0.0.1:8088

I am wondering how can I keep the http connection during each request?
Any ideas about that or any suggestions?
Thank you.

Chase

@gdubicki
Copy link

gdubicki commented Oct 4, 2024

I think this is partially answered by #107 (comment), but I would appreciate a full and clear answer from the maintainers too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants