View Full Version : thttpd (web server) for VPS
Carlos 02-09-2005, 10:37 PM I read on another forum that someone recommended the small web server thttpd. It made me think that it would be useful for people running low-end VPS accounts. Anyone using it? (or other non-Apache servers?)
"thttpd - tiny/turbo/throttling HTTP server"
http://www.acme.com/software/thttpd/
Cheers,
Carlos Camacho
------
<<Snipped>>
BurstNET 02-09-2005, 11:01 PM Several of our clients are running thttpd curently on our Virtuozzo-based VPS servers without issue.
Carlos 02-10-2005, 12:46 AM And did they (you) find that it helped reduce their load?
That's a very good idea! However, VPSes seem to get more loaded by anti-spam/anti-virus stuff, or untuned database servers, than Apache itself.
The most effective use of thttpd is to use it to serve all the images, while Apache deals with the dynamic content.
You should also check out Boa (www.boa.org), which is similar to thttpd, but may have options that better suit your needs. I've used both for a busy site and I think Boa was more robust (it was a while ago, so I don't quite recall).
If you're using Apache 2 you could always try to use the threaded module instead of the pre-fork one.
Let us know how it goes.
Carlos 02-16-2005, 08:25 PM The most effective use of thttpd is to use it to serve all the images, while Apache deals with the dynamic content.
Would you happen to have any links that show/explain how to do this?
Is the Roxen open source server (http://www.roxen.com/products/webserver/) worth checking out?
Also, although way out of my league, any comments on the Zeus server? (http://www.zeus.co.uk/products/zws/)
Cheers,
layer0 02-16-2005, 08:46 PM Carlos,
From what people have been telling me Zeus is much faster than Apache and less resource intensive. I may give it a try on one of my test servers :)
Carlos 02-16-2005, 09:03 PM Yes, that is what I have read from my quick scan of it. The prices are pretty high, so it's not for hobbyist. ;)
And their price chart needs a small update. Today, USD 1700 is only EUR 1300... but I've heard it's a nice server.
Originally posted by phvt
The most effective use of thttpd is to use it to serve all the images, while Apache deals with the dynamic content.
Originally posted by Carlos
Would you happen to have any links that show/explain how to do this?
You have the following options:
1. Keep all Web servers on port 80 and bind Apache to specific IP addresses and thttpd (or boa) to others.
2. Run thttpd or boa on a different port. This is not really recommended, because some (or many) corporate firewalls block outgoing access to non-standard ports.
In your dynamic, Apache-driven site, you'd reference all static content (e.g. images) using the URL of this boa or thttpd server. During site development, it would be best if you place all static files into a single directory, and that becomes the DocumentRoot of your boa or thttpd server.
excelblue 02-19-2005, 12:19 AM I have used thttpd before. It's not as powerful as apache, but it does its job if you don't have any complicated scripts.
Carlos 02-19-2005, 12:46 AM phvt, thanks for the info. I "almost" get what you are saying. I suppose I'll just need to sit down and try it.
I run Mambo, a content management system, so I am wondering if using Apache for the dynamic stuff and thttpd for the images would work in such a case.
Cheers
minsight 02-19-2005, 01:01 PM I'm using it for static image hosting. It's nice and lean.
That Guy 02-21-2005, 07:47 PM I use thttpd right now for one of my really crappy servers. It does a great job of serving up HTML pages and static content. :) But it is limited though.
ringnebula 02-22-2005, 04:21 AM You can also compile a thttpd/php combo that works quite well if you take into account a few quirks. There are issues with environmental vars with the combo among others.
If you take the time to properly test you applications/scripts and modify them if needed to run in this environment you just might be pleasantly surprised at how well it runs (better than apache by far in some situations).
edit: I should have mentioned that depending on your application you might be better off with a thttpd + php.cgi setup.
The problem with the regular thttpd is that it can only run one php script at a time. As you might imagine, this becomes a bottleneck especially when database queries are involved.
There's a "premium" (commercial, non-free) version of thttpd that supports FastCGI to run multiple scripts: http://schumann.cx/premium-thttpd/
Or, you could go with Zeus :)
Another way to go would be to keep your normal Apache setup, but run a squid cache (proxy) server in front of it. Squid is a single process which would handle many repeat requests without passing them to Apache. This is probably best for a CMS.
Carlos 02-22-2005, 10:12 AM Squid sounds interesting. I have forgotten everything I knew about it. Will check it out. Thanks!
|