Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'll like to know what are the things to consider when choosing between configuring an app as static or as dynamic in an Apache 2 server that uses mod_fastcgi. The app is a typical reporting app written in Perl with MySQL as the Db backend with fairly medium traffic. I'll love to hear your experiences about running FastCGI in such a scenario.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Neither of them really has set performance or scalability characteristics divorced from the context of your app and its environment. Which would work better depends on what you have going on.

Static: set number of app processes that hang around all the time. Conditions that argue for this include:

  1. You can afford to have enough instances of the app hanging around all the time to speedily serve as much traffic as you ever get, for whatever reason (the machine doesn't need to do anything much else, you never really get that much traffic, the machine has lots of spare resources, what-have-you).
  2. An app process instance has significant startup time and your users will be annoyed by it.
  3. The machine needs to only ever have some set proportion of its resources used up by this app so that other jobs can run without undue interference.

Dynamic: variable number of app processes that are started on demand and killed off when unused. Conditions that argue for this include:

  1. Your traffic is very spiky (self-similar), so that it's important to be able to spawn more app processes to handle it.
  2. An app process instance starts up very quickly, so it doesn't do much harm if one needs to be spawned to handle a request.
  3. The machine does need its resources for other purposes, so it's nice to free them up when you can, but it's okay to soak up a lot of them for this app when its traffic is heavy.
share|improve this answer
1  
Good answer. Thanks. –  GeneQ Jun 16 '09 at 7:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.