Here we are, PM2 1.0!
by Alexandre Strzelewicz -

First I want to say a big thanks to the Open Source community, small, large companies, startups, hackers, evangelists for your PM2 support. Now, in this century, it is possible to build large project with the collaborative, crowd intelligence, and PM2 is the one of those projects that shows it is real.

PM2 has reached some amazing millestones:

And today we are proud to announce the official release of PM2 1.0!

Official website and documentation

At the beginning, the one page documentation in the Github repository was a clear and simple way to understand each PM2 features. But with the time passing, the more features became available and using that documentation was not sufficiant anymore.

This is why we built a PM2 documentation website:

image website

PMS: Process Module System (with NPM)

Everything in a system is about processes. Processes are everything, it's what you are staring at (your browser), applications you are using on your phone, and so on.

So as everyone reading this article may know, NPM is a bloody awesome package manager. And with PM2, we wanted to leverage NPM to manage these process packages. That's why we integrated some NPM features into PM2 to manage these modules.

Install standalone software with PM2

Now you can publish and install stand alone processes (or services) via a simple command, pm2 install <module-name>.

We already teased about the module system with the article pm2-webshell: Expose a fully capable terminal in your browser, the procedure to install a webshell is as simple as:

$ pm2 install pm2-webshell

Since that some other interesting modules have been created, for example:

PMS: Writing your own module

Writing your own module is straightforward. With the latest PM2 just do:

$ pm2 module:generate <module_name>
$ cd <module_name>/
$ pm2 install .

And here you are! You launched your own module in development mode.

Learn more on how to create your module

We would love to know about the modules you created, please get in touch!

PMS: Process Module System & Keymetrics

Keymetrics module interface

Keymetrics PMS management interface

As you may have heard, Keymetrics is the company contributing to PM2, and we leverage our Open Source software to build an unique monitoring system.

More and more users are asking us to monitor more than their Node.js software. We listened to them and we uses the module system to satisfy their needs.

As the module system allows you to install any kind of softwares, it also allows you to install our Super Agents.

A Super Agent is a Node.js software leveraging one of the 200.000 modules available in NPM to connect, interact and query any kind of system. This will allow to expose important action and the Key Metrics of the targeted system.

So let's say you want to monitor your server, now with the PMS (Process Module System) you just need to do:

$ pm2 install pm2-server-monit

And you will instantly get a module that shows you the Key Metrics of you server with some default alert threshold and a focus on what matters to keep an eye on a server health:

Server monitoring

Server monitoring module

Or for MongoDB:

$ pm2 install pm2-mongodb

MongoDB monitoring module

MongoDB monitoring module

Modules are both manageable via CLI or via the Keymetrics Web Interface (free version can use that feature)

We already built modules for MySQL, Redis, RabbitMQ, ElasticSearch, Server, Cassandra, CouchBase, Memcache, MongoDB and more is coming!

PM2: New features and enhancements

  • PM2 1.0 has been battle tested in production servers for more than one month
  • Graceful Stop and Restart
  • All PM2 sub modules upgraded to latest
  • JSON application declaration now updates attributes on restart
  • Lower Memory and CPU overhead
  • Bullet prof module system
  • Configuration system (+display)
  • Signals system refactoring
  • And a lot more

Upgrading PM2

To benefits from those enhancements, just upgrade your PM2:

# Install the latest PM2
$ npm install pm2 -g 
# Update PM2 and keep the process list
$ pm2 update

Updating PM2 is Easy!

What's next? Inter-connected PM2s!

Never announce something without announcing what is coming next ;)

We are currently working on a Microservice Framework based on PM2 that will allow you to inter connect multiple PM2 instances in the same private network with message exchange via a powerful PUB/SUB system. And more than that we are going to provide you the right tool and philosophy to ease your micro service applications build, automatically scalable.


The difficult Microservice equation, what is the best pattern?

Stay tuned as we are reading ton of books about the subject to solve this really difficult equation in a simple way,

Future is bright!