3 ms·
What web server do you use?
by icey 17y ago
What web server do you use?
- blasdel 17y agoWhatever's most appropriate for the job! For dynamic content I use the HTTP abstraction native to the language I'm using (WSGI, Rack, Servlets, etc.), and a single-purpose HTTP server that supports it: twisted.web, cherrypy.wsgiserver, GAE, mongrel, etc. For production, separate HTTP servers (possibly in multiple layers) reverse-proxy the app servers: handling client interaction, caching, routing, dispatch, etc. Apache's design is completely degenerate: you're encouraged to do all of these logically independent things in one process, even the app execution! Years ago I used lighttpd and even hacked it's webdav implementation for using on localhost as an alternative to FUSE on OS X. I eventually realized that they made all the same design mistakes as Apache, they just had the courtesy to use epoll (the Apache MPMs are a cruel joke).
- icey 17y agoWould you consider Apache appropriate for the job for someone who doesn't want to have to try six different solutions to serve their webpages? I hear what you're saying about it being monolithic, but I do think it has its place.
- blasdel 17y agoYou generally don't need the reverse proxies in front until you're doing something sizable (or that fits into something of size). I haven't done a project that needed them in a while! You can just use a single app server capable of processing multiple requests -- twisted.web is a solid event-driven one. If you just need to serve static pages nginx is perfect by itself. If you really need a monolithic swiss-army-knife, lighttpd is at least a pretty good implementation of a mediocre idea. I really dislike a lot of things about Rails, but I will be eternally grateful for the way their community accidentally demonstrated to the world that the ASF's crap was not the alpha and the omega of webserving. At the time the only options that people thought viable were httpd and overarchitected babel towers (lots of Java crap, WS-*, Zope, etc.).