Can I use Apache mod_proxy as a connection pool under Prefork MPM?

Summary / Quesiton:

My Apache works with Prefork MPM, php works. I am trying to use Apache mod_proxy to create a reverse proxy server with which I can redirect my requests so that I can use Apache to pool pools. Example impl:

in httpd.conf:

SSLProxyEngine On
ProxyPass /test_proxy/ https://destination.server.com/ min=1 keepalive=On ttl=120

but when I run my test, which is the next command in the loop:

curl -G 'http://localhost:80/test_proxy/testpage'

it doesn't seem to reuse connections.

After some further reading, it sounds like I am not getting connection pool functionality because I use Prefork MPM, not Worker MPM. Therefore, every time I make a request to the proxy server, it starts a new process with its own connection pool (one in size), instead of using a single worker that supports its own pool. Is this interpretation correct?


Background Information:

There is an external server to which I make requests, via https, for each page that gets to the site that I launch.

SSL- , php, , , - 300 , 300 SSL- , script.

, - Apache , php-, SSL- .

, :

+5
3

, , , . , .

, -.

Client ====== (A) =====> ProxyServer

A. - , . , .

Client ====== (A) =====> ProxyServer ====== (B) =====> WebServer

, , - A, B, ?

, . . - , . , .

, , .

SSL A, , . B, A , ?

? A. . . , , - "Keep-Alive", , a , , . , .

B ; , .

?

, - -. .

, -, ( ssl) . .

Apache, mpm_worker mpm_prefork. 300 + . ; 300 , , .

, nginx Apache. PHP, .

, . . , PHP .

, , -, , CDN, AWS S3 + CloudFront Rackspace CloudFiles. CloudFront, S3 . Rackspace Akamai!

- ", , ? , , !" , -, - html- .

, .

+2

Prefork - 1 .

Prefork , , , MinSpareServers/MaxSpareServers .

, PreFork , MaxSpareServers MinSpareServers, "" acceptin .

% P LogFormat, , .

+1

The problem in my case was that pooling between the reverse proxy and the server server did not occur because the Backend Server Apache server closed the SSL connection at the end of each HTTPS request.

The Apache Server backend did this because the httpd.conffollowing Directive was present in the directive :

SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown

This directive does not make sense when the backend server is connected through a reverse proxy, and this can be removed from the server configuration.

0
source

All Articles