3 ms·
pm2 is by far the best node process manager. It is excellent. Though I don't use pm2 for deployments. I create new servers (immutable infrastructure) on AWS ev
by nodesocket 11y ago
pm2 is by far the best node process manager. It is excellent.
Though I don't use pm2 for deployments. I create new servers (immutable infrastructure) on AWS every deploy, and use NGINX Plus dynamic upstream to add the new backends and remove the old ones. There is something pleasing about creating new servers and destroying old servers every deploy.
Also check out Drone (https://github.com/drone/drone https://github.com/drone/drone) for all your CI and deployment needs. It uses Docker and written in go.
- smaili 11y agoLaunching new instances on a per deploy basis is one of the most absurd things I've ever heard.
- nodesocket 11y agoI'm guessing you don't come from an ops background... Do a Google search for immutable infrastructure.
- adrianpike 11y agoSerious question, why do you think that? I'm not that familiar with why this would be super wasteful and would love to learn more.
- cosmie 11y agoI wouldn't say it's super wasteful, but there is waste involved since he's on AWS. AWS bills EC2 usage hourly, and doesn't do fractional billing. If you deploy, then 5 minutes later deploy again (and provision a new instance and destroy the first) you'll still pay for the full hour of that first instance. So every deploy incurs that usage rounding. Depending on the frequency of deploys and the number of servers being deployed to, that adds up.
- bschwindHN 11y agoWhat do you do for deployments?
- seabrookmx 11y agoFor simpler projects, Elastic Beanstalk is also a pretty good option. It integrates nicely with auto-scaling, and any CI system can tie into the AWS CLI to dump a zip on S3, and then call Beanstalk "update-environment" to load that code onto an environment for a full CD pipeline. If you have a more polygot stack, or rely on other non-node systems like RabbitMQ or whatever, standardizing on Docker containers is a no brainer though.