We need to host node ourselves (Rackspace server) to have access to the file system (temp files for image processing) and (legacy) local database.
Have you hosted node in production? If so, what was the web server setup? Currently, we're using nginx + a unix socket file + forever or upstart. My inclination is to stop hosting it ourselves and go for a PaaS (like heroku) - but that's because I wish this stuff was not my problem. What I'm looking for is a clear recipe for best practices.
Hosting node is hard because unhandled errors force the node.js v8 process to die and need a restart.
- unix socket file and web server configuration ... do I need a unix socket file?
- unix file keeps port private (but you could also block it with a firewall)
- Lots of EMFILE errors restarting
- nginx or apache?
- nginx seems to be most accepted answer
- forever or upstart...? *
- multiple node processes
Good description of nginx setup
Problems hosting our own servers
- cloning servers (instead of deploying app instances)
- managing resources on servers (checking on available memory, disk space)
- auto-restart when OS restarts
These guys use their own web server and application hosting stacks, which are worth investigating to see if there are any open source components we can re-use.
nodejitsu heroku openshift