4

I am a dummy in web apps. I have a doubt regaring the functioning of apache web server. My question is mainly centered on "how apache handles each incoming request"

Q: When apache is running in the mod_python/mod_php mode, then does a "fork" happen for each incoming reuest?

  • If it forks in mod_php/mod_python way, then where is the advantage over CGI mode, except for the fact that the forked process in mod_php way already contains an interpretor instance.

  • If it doesn't fork each time, how does it actually handle each incoming request in the mod_php/mod_python way. Does it use threads?

PS: Where does FastCGI stands in the above comparison?

Beryllium
  • 12,808
  • 10
  • 56
  • 86
Vivek Jha
  • 1,520
  • 3
  • 16
  • 26

1 Answers1

0

With a modern version of Apache, unless you configure it in prefork mode, it should run threaded (and not fork). mod_python is threadsafe, and doesn't require that each instance of it is forked into its own space.

dan
  • 4,262
  • 7
  • 25
  • 40