Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an API that used to run on Apache but now is served via lighttpd. I can easily switch the API URL in the app to the lighty port like I wonder if I should use mod_proxy instead to have cleaner urls. There is no redirect for legacy urls necessary. What would be the overhead for the Apache in between compared to the direct call?

Would mod_proxy and Apache steal the benefit of lightys lightweightness?

share|improve this question
I'd suggest getting two IP's instead, then Apache can listen on port 80 on one IP and Lighttpd can have the other, then you wouldn't have to worry about proxying. Then you can set up something like '' to go to the lighttpd IP and '' to go to the apache one. I don't know your infrastructure so I'm not sure how easy that will be but just my suggestions, YMMV – Smudge Jun 20 '11 at 11:40
up vote 1 down vote accepted

It's safe to say mod_proxy will be an overhead, because you're routing the queries through two pieces of software instead of one. Unless mod_proxy is providing some caching (and hence a performance benefit) then it will reduce performance.

How much isn't something anyone can answer easily - you would need to profile it yourself.

Configure it without mod_proxy (i.e. direct to lighttpd) and run a selection of tests and measure the performance. Then, configure it so it goes via mod_proxy in Apache and perform the same tests. Measure the difference and decide if you want to pay for the better looking URL's with the performance hit you measured.

Don't forget you'll need to factor in request speed and concurrency, if you can, in your tests.

So in summary, yes, it's likely there'll be an overhead but you'll need to profile it yourself to measure it.

share|improve this answer

Your Answer


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.