See What is Node.js? where we pinpoint:
Node in production is definitely possible, but far from the turnkey deployment of what would seem to be documented promise. With Node v0.6.x, the "platform" was integrated into the platform, providing one of the main building blocks, but my "production.js" script still has ~ 150 lines of logic to handle things like creating a log directory, disposing of the dead workers, etc. For "serious" production service, you also need to be prepared to suppress incoming connections and do whatever Apache does for PHP. In fairness, Rails has this exact problem. It is solved using two additional mechanisms: 1) Putting Rails / Node for a dedicated web server (written in C and tested to hell and vice versa), like Nginx (or Apache / Lighttd). The web server can efficiently serve static content, maintain an access log, rewrite URLs, interrupt SSL, apply access rules, and manage multiple sub-services. For requests that fall into the actual Node service, the web server proxies the request. 2) Using a framework such as Unicorn, which will manage work processes, process them periodically, etc. I have not yet found a Node working structure that seems completely baked; it may exist, but I have not found it yet and am still using ~ 150 lines in the "production.js" manual rental.
source share