0

(I am already aware of worker and event and how they differ from prefork, this is a prefork only question)

First question:

What is meant by "request" on this page?

http://httpd.apache.org/docs/2.4/mod/prefork.html

"Apache httpd always tries to maintain several spare or idle server processes, which stand ready to serve incoming requests."

incoming HTTP requests?

incoming TCP connections?

Second question:

Does it mean that if I open a website that contains 5 images in it, 5 Apache processes are required and therefore 5 PHP images (assuming mod_php is on)?

Thanks

user9517
  • 114,104
  • 20
  • 206
  • 289
wlf
  • 371
  • 2
  • 13

1 Answers1

1

"Requests" in that context means a TCP connection. It is certainly possible for a single TCP session to send multiple HTTP requests, all of which would be handled by the same process. (Assuming a basic setup with nothing proxying the HTTP requests before Apache sees it.)

And the answer to the second part depends on the browser's behavior. Some browsers will handle that page by opening separate connections to the server for each image so it can load them in parallel. In that case, you would need 6 processes (one for the HTML, five for the images). Most browsers have a limit on how many connections they will open. If that limit was, for example, two, then each connection would send three requests each and only two Apache processes would be required.

Insyte
  • 9,314
  • 2
  • 27
  • 45