For any SaaS running on Node.JS, is really a web-server necessary?
If so, which and why?
What will be the disadvantages of utilizing just node? It's role would be to just handle the CRUD demands and serve JSON back for client to parse the date (like Gmail).
"is really a web-server necessary"?
Technically, no. Practically, yes another web server is usually used and permanently reason.
In this talk by Ryan Dahl in May 2010, at 37'30" according to him he suggests running node.js behind a reverse proxy or web server for "security reasons". To elaborate on that, hardened web servers like nginx or apache have experienced their TCP stacks evolve for any very long time when it comes to stability and security. Node.js isn't at this same level yet. Thus, since putting node.js behind nginx is simple, does not have numerous negative effects, and theoretically boosts the security of the deployment somewhat, it's a sensible choice. At some stage in time, node.js might be considered formally "ready for live direct Online connectionsInch but watch for Ryan/Joyent to create some announcement to that particular effect.
Next, binding to sub-1024 ports (like 80 and 443) necessitates the process to become root. nginx yet others instantly handle binding as root after which shedding rights to some safer user account (www-data or nobody typically). Although node.js has system call wrappers within the
process module to decrease root rights with
setuid, AFAIK apart from coding this yourself the node community has not yet seen a convention emerge for carrying this out. More about this subject in this discussion.
Third, web servers are great at virtual hosting as well as in general you will find convenient steps you can take (URL spinning and the like) that need custom coding in node.js to attain otherwise.
Furthermore, nginx is excellent at serving static files. Much better than node.js (a minimum of with a little by at this time). Again as time goes forward this time can become much less relevant, but i believe a conventional static file web server along with a web application server have distinct roles and reasons.
"If so, which and why"?
nginx. Since it has great performance and it is better to configure than apache.