Create one stable connection for a proxy

I needed a hyper proxy to put it in front of my web-server and used a reverse proxy.
Right now, I found out it creates a new connection to my web-server to redirect the incoming request, when it receives a new request.
PROXY_CLIENT.call(client_ip, "http://127.0.0.1:13902", req)

But I think it affects on the performance.
I want to know is it possible to change it to create only one stable connection and redirect all the incoming requests to the web server over this single connection?

Yes, you can establish a TCP connection to your host from your proxy and write bytes from incoming requests to that existing TCP connection.

1 Like