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

Become a contributor for community

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

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.