-
.Net
-
Backup
-
Data Storage Containers
-
Docker Containers
-
Environment Management
- Swap-Domains
- Clone Environment
- Create Environment
- Environment Aliases
- Environment Aliases
- Environment Migration between Regions
- Environment Regions
- Environment Transferring
- Environment Variable
- Environment Variables
- Environment Variables(Apache meaven, Memcached)
- Environment Variables(Go)
- Environment Variables(JAVA)
- Environment Variables(Load Balancer)
- Environment Variables(Node.js)
- Environment Variables(PHP)
- Environment Variables(Ruby)
- How to Migrate a WordPress Site to BitssCloud PaaS
- How to migrate my environments from another Jelastic provider?
- HTTP Headers
- Java VCS Deployment with Maven
- Setting Up Environment
- Share Environment
- Why is my environment in sleeping mode?
- Show all articles (9) Collapse Articles
-
Java
- Environment Variables - Java custom Environment Variables
- Java App server Configuration
- Java Options and Arguments
- Multiple Domains on Tomcat server
- Secure Java Encryption and Decryption
- Spring Boot Standalone and Clustered Java Applications with BitssCloud
- Timezone Data for Java/PHP App Server
- Tomcat HTTP to HTTPS redirect
- WildFly server
-
LiteSpeed Web Server
-
OOM Killer
-
Python
-
Reseller SetUp
-
Secure Socket Layer (SSL)
-
Troubleshooting
-
Account Management
-
CDN
-
Databases
- Database Configuration
- Database Connection Strings
- Database Hosting in BitssCloud
- Environment Variables(Database)
- Galera Cluster not working
- How to export/Import Database via Command line
- How to install MSSQL server on Linux (2017)
- MariaDB/MySQL Auto-Сlustering
- MongoDB Database Backups
- PostgreSQL Database Backups
- PostgreSQL Database Replication
- PostgreSQL Master-Slave Cluster
- Remote Access to PostgreSQL
- Schedule Backups for MySQL and MariaDB Databases
- Scheduling Databases Backups
-
Domain Name Management
- Container Redeploy
- Custom Domain Name
- DNS Hostnames for Direct Connection to Containers
- How to Bind Custom Domain via A Record
- How to Bind Custom Domain via CNAME
- Multiple Custom Domains on an Nginx Web Server
- Multiple Domains with Public IP
- Multiple Public IP Addresses for a Single Container
- Setup WordPress Multisite Network with Domain Mapping and CDN
-
Jenkins
-
Load Balancing
-
PHP
- Creating Environment for PHP
- Deploy PHP Project Via GIT SVN
- How to Check Change PHP Version in BitssCloud
- How to create environment for AngularJs/ReactJs
- How to Enable PHP Extensions
- How to Install Custom PHP Application
- Ion cube Loader
- MariaDB PHP connection
- MySQL PHP Connection
- NGINX PHP
- PHP App Server Configuration
- PHP Connection to MongoDB
- PHP security settings
- PHP Session Clustering
- PostgreSQL PHP Connection
- Running Multiple Domain Names on Apache Server
- Security configuration for Apache
- Zero Downtime (ZDT) Deployment for PHP
- Show all articles (3) Collapse Articles
-
Release Notes
-
Ruby
-
SSH
-
Wordpress
-
Application Management
-
Cluster
-
Deploying Projects
-
Elastic VPS
- CentOS VPS
- Elastic VPS configuratation
- Elastic VPS with full root access
- Installation of cPanel in BitssCloud
- Java Console Application with CentOS VPS
- Linux VPS Access via Public IP
- Linux VPS Access via SSH Gate
- Setting Mail Server Inside CentOS VPS
- Setting Mail Server Inside CentOS VPS
- SSH Access to VPS Gate
- Ubuntu VPS
- Ubuntu with CSF Firewall
-
High Availability
-
Jitsi
-
Node.js
-
Pricing System
-
Request Handling
-
Scaling
- Application Server with horizontal scaling
- Automatic Horizontal Scaling
- Automatic Horizontal Scaling: Multi Nodes
- Automatic Vertical Scaling
- Database Horizontal Scaling
- Docker Containers Horizontal Scaling
- Horizontal Scaling
- Load Balancer with horizontal scaling
- Memcached horizontal scaling
- Storage Container
- VPS Horizontal Scaling
-
Traffic Distributor
-
General
- Apache & NGINX Modules
- BitssCloud Dashboard Guide
- Build and Deploy Hooks
- Cron Job scheduler
- FFMPEG Setup
- File Synchronization
- FTP Overview
- FTP/FTPS Support in BitssCloud
- How to Deploy Magento into BitssCloud PHP Cloud
- How to Enable Expert Mode in JCA
- How to open a support ticket to BitssCloud
- Installation of FTP
- Kubernetes Cluster
- MarketPlace
- Reduce Cloud Waste with Automatically Scheduled Hibernation
- Run Configuration
- SFTP Protocols for Accessing BitssCloud Containers.
- Supported OS Distributions for Docker Containers
- Timezone Addon
- Two-Factor Authentication
- Types of Accounts
- Varnish
- Websockets Support
- What is Cloudlet
- What is PaaS & CaaS
- WordPress AddOn
- Zero Code Change Deploy with No Vendor Lock-In for Smooth Migration across Cloud Platforms
- Show all articles (12) Collapse Articles
-
Go lang
-
Wordpress category
-
Data Storage Container
-
Memcached
-
Account & Pricing
Process Managers For Node.JS
Choosing a Process Manager for NodeJS
Node.js process manager is a tool, which provides an ability to control the application lifecycle, monitor the running services and facilitate common system admin tasks to maintain your project operability.
BitssCloud provides four pre-configured process managers by default, which can be selected in the following ways:
- by selecting the appropriate tag during the environment creation or container redeploy
- by editing the PROCESS_MANAGER Docker environment variable in the already created container(s) with the forever, npm, pm2 or supervisor value (restart is needed to apply the new options)
Below, we’ll consider each of the available managers to help you select one:
- Process Manager (npm)
- PM2
- Supervisor
- Forever
Process Manager (npm)
A public process manager package is provided for Node.js server within the npm registry. It is a simple module to initiate and configure multiple processes through the spawn method, using a dedicated configuration object with the following parameters:
- number – a number of processes to spawn, e.g. 4
- timeout – a time (in milliseconds) for each spawn to occur
- strategy – either series or parallel, to spawn one at a time or all together respectively
- readyOn – signal to indicate the script is ready, either listening (by default) or ready
PM2
PM2 provides a huge variety of application management features, including the launched NodeJS processes monitoring. You can get acquainted with the list of commands for pm2, which can be executed directly via SSH.
For example, after Node.js server creation, you can list the running processes with the following command:pm2 list
As you can see it shows the default draw-game application is running. Next, you can remove this app with the pm2 delete command and deploy your own project (e.g. the default Hello Word by BitssCloud ):
Also, PM2 provides users the ability to create the configuration files where all the run options are listed, which is useful for microservice-based applications deployment, as several apps can be described in a single file. The appropriate config file referencecan be found by following the provided link (e.g. the default ecosystem.config.js file is used to launch the server.js application file as the “draw game” application).
Supervisor
Supervisor is a great solution to keep your applications running. It automatically monitors any code changes in the launched .jsscripts and restarts the appropriate app to keep it up-to-date. Herewith, it allows to perform a hot restart of your NodeJS processes, ensuring they are always available and are automatically restarted in the event of a failure.
You can run the following command on your Node.js server with the supervisor process manager to get help:node-supervisor -?
Here, you can find a short description of the module, its usage syntax, additional options descriptions and a few examples.Forever
The forever process manager is the simple CLI tool, which allows to make your NodeJS processes run continuously. It permanently keeps a child process (such as your project on the Node.js webserver) and automatically restart it upon failure.
Run the next command to get the main information on the forever manager usage, actions, usage, etc:forever –help
Also, using forever you can specify the application options in a JSON file. For example, for the default Draw game (available after Node.js server installation), this /home/BitssCloud/ROOT/forever.json file looks like:
{ "uid": "app1", "append": true, "watch": true, "script": "server.js", "sourceDir": "/home/BitssCloud/ROOT" }
where:
- uid – sets unique name for your app
- append – selects if logs should be supplemented (true) or overwritten (false)
- watch – allows to enable or disable automatic restart of a child process upon the appropriate application code changes
- script – defines a name of the executable .js file
- sourceDir – provides an absolute path to the specified script