Question

Deploying my nodejs that runs using pm2 on app platfrom

Okay I was searching for my options to deploy my nodejs and found app platform which I thing is great but If I wanted to run my nodejs using pm2 to enable clustering is that possible or should I just implement my clustering logic on my own. Secondly If I wanted to use redis later on to cache some endpoints results on my server would that be possible? And would any of those cause additional fees (assuming I dont need more RAM)?


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

bhuggins
DigitalOcean Employee
DigitalOcean Employee badge
March 11, 2021
Accepted Answer

The app platform has a load balancer built into it, allowing you to scale the number of instances of your application to your needs. That being said, could be times when you would like something like pm2. Some of the instance sizes offered have multiple CPU cores, and to be able to take advantage of them you would need to either have multi-threaded code, or spawn multiple worker processes. There are multiple ways to achieve that. Also, if the app platform will try to restart the application if the process dies.

It is possible to add connections to redis or other databases. DigitalOcean offers managed databases (redis, mysql, postgres, mongodb) which can be used with the app platform.

Pricing depends on the scale of the application, plus any overage fees for extra bandwidth or excessive building times. Managed databases are also an additional service that would add extra charges. Pricing for app platform can be found here. Pricing for managed database can be found here.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel