I am currently running apache2 on a SUSE instance @EC2. As part of my site, my data uses mod_proxy to hit a REST server running IIS via Proxy/ReverseProxy.
After setting up my vhosts, enabling mod_proxy and establishing my config, I found that I was frequently encountering 502 errors. These errors were of the Proxy Error and Bad Gateway flavour. After doing some considerable google, I found that there was a difference in the way IIS and apache terminate their connections which was causing the error. After setting the following environment variables, performance has improved markedly:
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
SetEnv proxy-initial-not-pooled 1
What I'm wondering is why this works and what an ideal configuration would look like.
Is my understanding that, with the Env variables:
I am forcing an HTTP 1.0 request (which will standardize the termination expectaions)
NOT keeping alive any connections
NOT using any pooled connections
correct?
What if I need to use pooled connections? What if I want to use keep-alives? In short, I'm looking for best practices to replace the toothpick and glue solution I'm currently using