logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: mod_h2 + mod_php - can requests be serviced in parallel?
Author
hredelmyer



Joined: 23 Jan 2016
Posts: 1
Location: canada, vancouver

PostPosted: Sun 24 Jan '16 20:59    Post subject: mod_h2 + mod_php - can requests be serviced in parallel? Reply with quote

For reasons beyond my control I need to use mod_php with Apache.

I was playing with mod_h2. My web page does a lot of requests to the service on loading that are handled by PHP.

Without mod_h2 enabled, these are a farmed out to several httpd processes - as many as the browser deigns to send in parallel.

With mod_h2 enabled, all the requests seem to be sent to a single httpd process and are processed one at a time. The page therefore loads twice as slowly than without h2. I was hoping to be able to process more of the requests in parallel.

Questions:

1) Is there a way of configuring mod_php + mod_h2 to allow more than one httpd process to handle the requests?

2) Would fastcgi send the requests off to several different PHP processes or does it suffer the same problem?

3) If I used nginx to handle the http2 and forward the requests to the apache server would I get more parallelism?

4) Has anyone come up with a google or other search engine query that can actually find useful information on this topic?

Thanks
Horace
Back to top
covener



Joined: 23 Nov 2008
Posts: 59

PostPosted: Sun 24 Jan '16 22:41    Post subject: Reply with quote

Presumably you're on prefork, There's no way way to redistribute the requests on a single h2 connection and no safe way to run them through mop_php in parallel.

FastCGI would be able to run in parallel, out of process. At that point you'd bail on prefork too.
Back to top
icing



Joined: 22 Sep 2015
Posts: 41
Location: Münster, Germany

PostPosted: Tue 26 Jan '16 11:52    Post subject: Reply with quote

As Eric wrote, fastcgi should be the way to go foward, if you can make it work with your php app.

The thing you described for nginx, a reverse proxy in front of your php, can also be done with Apache, or nghttpd or h2o. But a worker/event mpm with fastcgi should server you better.
Back to top


Reply to topic   Topic: mod_h2 + mod_php - can requests be serviced in parallel? View previous topic :: View next topic
Post new topic   Forum Index -> Apache