Apache - Application Pool Equivalent

Hi Folks,

We have an Apache server serving multiple web-sites and some of these are causing issues, failing and bringing down all the sites on the server.

We are trying to isolate the problematic sites and separate out those we know are working.

In IIS I would use Application Pools to keep these sites separate so that failure doesn't propagate through; is there an equivalent way of doing this within Apache?  

Thanks for your help.

Jes
JesSadOldGothAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Steve BinkCommented:
There is no equivalent concept in Apache, though you can achieve something similar using multiple server instances and a reverse proxy configuration.  See here:

http://wiki.apache.org/httpd/DifferentUserIDsUsingReverseProxy#Alternative_Proxy_Configuration

The idea is you have two instances of Apache running - one for each site - and a third instance to answer public requests.  The third server is your reverse proxy, which will field all incoming requests and forward them on to the proper instance.  If any individual site instance fails, it will only stop the sites running in that instance.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JesSadOldGothAuthor Commented:
Hi Steve,

Thanks for the answer, I'll pass it on.  I'll accept or otherwise afterwards, but appreciate the response regardless.

Later,

Jes
0
Dave BaldwinFixer of ProblemsCommented:
Are you getting error messages?
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

JesSadOldGothAuthor Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for JesSadOldGoth's comment #a40986467

for the following reason:

Thanks for this answer, it seems to have done the job.
0
JesSadOldGothAuthor Commented:
Thanks for this Steve, it's done the job.
0
gheistCommented:
There is such concept in apache contrary to what was told before.
suexec, mod_fcgid or both (how do you think shared hosting works?)
then around that you use cgroups to configure resources for system users like you did with application pools.
0
Steve BinkCommented:
@gheist: can you provide any links to information about your approach?  AFAIK, using FCGI on Apache is not quite the direct parallel to application pools on IIS.  I'd like to see how to the two compare.
0
gheistCommented:
Somewhere in fcgid doc around php (yes, it does not sort static file serving by "pool")
0
Steve BinkCommented:
The specific question I have is that FCGI applications are global to the web service, while application pools in IIS are specifically limited to members of the pool.  In terms of Python, for example, this means the application level must take care of threaded environments when using mod_fcgi, where an IIS application pool would handle threading transparently.

Also, in the context of this question, a failure in the CGI parent application would be felt globally as well, since everything is working off the single instance.

Do I understand this correctly?
0
gheistCommented:
fcgi pools are per command + per virtualhost, 500 processes default in each POOL.
sorry, i cannot provide you with MSDN article, MMC snapin and ADMX file to understand that better.
0
Steve BinkCommented:
I was basing my conclusions on a note I saw at http://www.fastcgi.com/mod_fastcgi/docs/mod_fastcgi.html, under FastCgiServer:

Note: Using FastCgiServer within a VirtualHost does not necessarily limited access to that host. If filename is accessible via other virtual hosts, they too can leverage the same definition.
0
gheistCommented:
What your reference has to do with mod_fcgid by apache software foundation?
0
Steve BinkCommented:
Ah, true.  That's what happens when you stay up much too late.  :)

In the Apache mod_fcgid docs:
The pool of fcgid-invoked programs is shared between all httpd workers.

So, while it can be configured to run more than one process per application based on load, there is no way to segregate those loads logically.  That means that a failure in a mod_fcgid application can affect not just the httpd thread causing the failure, but any thread currently using that instance.

This is addressed in IIS by using application pools.  Each application pool can launch its own FastCGI process, keeping it isolated.  You brought up shared hosting previously... my previous hosting employer offered distinct levels of shared hosting on Windows - one with a shared application pool (i.e., like the nix Apache model), or a dedicated pool.
0
gheistCommented:
All apache workers serve all sites, and they all use same per-virtualhost fcgid pools
0
Steve BinkCommented:
>>>  they all use same per-virtualhost fcgid pools

I think that's the core of the issue - the pools are per server, not per virtual host.  It does not appear that Apache will create separate instances of an fcgi app for different hosts, or allow a virtual host to select a particular "pool" to use.
0
gheistCommented:
Sam "defect" as IIS. Only that IIS does not make resource control so obvious.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.