I have a node.js app running on a Digital Ocean MEAN droplet. When over 300 people are accessing it at the same time it just hangs. At first I noticed that it was opening over 1000 files at once. I have moved a bunch of the static images to Amazon S3 to help with that, and upped the limit in ulimit (temp fix to stop the server from completely dying). I contacted Digital Ocean and they said the server should be able to handle the traffic.
Just wondering what steps I should be taking to figure out why this is happening.
Some things I am probably doing wrong:
- I am still serving some static files from the node server. I plan on reducing this to as low as I can.
- I don't have a reverse proxy setup for it (nginx, haproxy, etc).
- The database is running on the same server as the node.js app.
If you want me to provide any additional info, please ask. I will gladly do so.