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.

Is it possible to make Apache load balance hits to a particular directory? If a lot of requests are coming in to just a specific resource, I don't want to cripple the servers ability to respond to other requests.

share|improve this question
1  
Directories? This doesn't make any sense. What kind of "load" affects "directories"? What would you be balancing? Please elaborate what kind of problem you are trying to solve. –  Caleb Apr 15 '11 at 11:42
    
Basically I have a server with a website. One of the directories is used as an API. If the API is bombarded with requests, I don't want it to effect the users using the rest of the site. –  Matthew Xerri Apr 15 '11 at 11:54
    
I rewrite your question based on where it sounds like you were going because the initial one didn't make any sense. If this isn't your problem, please try better expressing it yourself. –  Caleb Apr 15 '11 at 12:05

1 Answer 1

Load balancing requires multiple servers and some sort of load balancing device that sits in front of the resources being balanced. It doesn't sound like you have the pre-requisites for this scenario. Apache isn't usually the tool used used to balance loads, it is the resource being balanced.

That said, there are ways to configure your system to reduce the problem I guess you face. One would be to rate limit request to a specific resource so that the server would never get slammed with those requests. This would make the API unresponsive some of the time.

Another would be to run a separate server for just that resource, then use apache to proxy or otherwise pass off the load so that it's not busy filling those requests.

share|improve this answer

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.