0

Being a beginner in the web world, I've always used Apache to develop applications in PHP. Getting tired of it, I learned Node.js, Rails and Django -- just to get a taste of each of the most used web frameworks nowadays. All of them have built-in webservers -- Django's is advertedly just for development purposes -- and I'm not sure I need a dedicated server software. Even if I would, it would be Nginx -- I found it way easier to configure, and have heard it's a lot better at handling high loads than Apache.

My question, though, is: what are the advantages of using a web server like Nginx or Lighttpd with FastCGI over the production Rails or Pyramid servers, for example? Should the one-line invoke Node.js server be used for production (e.g. does it fare well in the job)?

In short: why shouldn't I use Waitress or Webrick or Node.js' http?

1

1 Answer 1

0

Rails and Django are development frameworks, to be able to serve requests from a web browser, they need a web server that will execute the code. I'm not sure about Node.js, but I would expect they are similar.

Rails and Django are not web servers by themselves, but they use a small web server during development to makes things easier. That's how you can run, for example:

rails server

and have you app running on localhost:3000. In the case of Rails, the web server it uses is called Webrick. These small web server are very convenient for development, but they should not be used for production. Security wise they are not necessarily hardened and they are also not optimized for speed. On production environments you should use Nginx or Apache.

2
  • Does this answer the question or would you like me to go into more details? Feel free to ask and I'll try to elaborate more. May 26, 2014 at 11:31
  • It's fine by me; the question linked to by Michael Hampton also helped quite a lot. It would be nice for people who get to this question via Google or SF to have more in depth info on the advantages of production HTTPD software, though.
    – gchiconi
    May 27, 2014 at 1:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .