Search Knowledge Base by Keyword

Node.js Developer’s Centre

UKHost4u comes up with an amalgamation of the speedy, lightweight, and extremely scalable Node.js application server. To make the process of hosting extremely easy for developers, it is automatically provided with multiple optimizations and management tools. This article will enlighten you about the important tools and features present on this platform to an optimal level of Node.js hosting.

Here’s what you will read in this article;

  • Environment Hosting with Node.js
  • Versions of Node.js
  • Application Deployment with Node.js
  • Node.js Package Managers
  • Node.js Process Managers
  • Domains Management
  • Automatic Vertical Scaling
  • Manual Horizontal Scaling
  • Automatic Horizontal Scaling

1. Environment Hosting With Node.js

You need to create a suitable environment using the strong and instinctive Environment Topology wizard to work with your Node.js application. Move to the Node.js tab in the wizard, choose the preferred version of the engine for your application server and add any other software stack needed. Based on your requirement, change other parameters such as cloudlet and nodes, Public IPv4 or IPv6 addresses, etc.

2. Versions Of Node.js

At the time of writing this article, the following versions of Node.js are supported by the platform;

  • 12.22.9 LTS
  • 14.18.3 LTS
  • 15.14.0 LTS
  • 16.13.2 LTS
  • 17.3.1

You can directly choose the version of Node.js from the Environment Topology wizard while creating a new environment and adjusting it for the already existing environment through container redeployment.

3. Application Deployment With Node.js

UKHost4u mechanises the process of deployment for the managed Node.js application servers through:

  • Application archive uploaded from the local device or through an external URL
  • Remote VCS repository, for instance, GitHub

4. Node.js Package Managers

For more convenience, every Node.js application server has an in-built development tool known as Package Manager. It gives standardisation and automation of the installation, configuration, update, and deletion procedures.

UKHost4u provides two kinds of package managers:

  • Npm: handles your project requirements by installing the extra modules, packages, and all-set-to-work applications. 
  • Yarn: works with the same requirements as in npm while giving more speed, trustability, and benefit.

The npm package manager is utilised for Node.js application servers automatically, but it can be easily shifted to yarn if required. For that, launch the container variables window and apply the suitable PACKAGE_MANAGER value. 

5. Node.js Process Managers

Process managers assist with the ability to manage the application lifecycle, keep a check on the running services, and keep up with the project functionality.

  • Npm: starts and manages several processes.
  • Pm2: gives an enormous variety of application management features, as well as the Node.js process monitoring.
  • Forever: permits running your Node.js processes consistently and automatically rebooting them upon destruction.
  • Supervisor: checks the working applications for modifications and by default reboots the needed ones to keep them upgraded.

The platform users can select the needed process manager during container redeployment or by modifying the PROCESS_MANAGER variables.

6. Domains Management

Instead of using the default name, you can supplement your Node.js application with the custom domain name. Based on your Environment Topology there are the following two options;

  • CNAME redirect: In case you are using a shared load balancer, then CNAME redirect is advised for dev and test environments. 
  • DNS A record: In the case of using a Public IP, DNS A record helps in handling high traffic load and is appropriate for production environments.

You can instantly shift between the environments with the help of swap domains operationality.

7. Automatic Vertical Scaling

UKHost4u PaaS platform gives the accurate amount of resources, i.e., RAM and CPU needed by your nodes depending on the current load without any manual interruption. This results in preventing you from the overpayment of unnecessary resources. This saves your time as well because the platform rules out the requirement to handle load-related adjustments or architectural changes. 

All you need is to see the upper limit of cloudlets (1 cloudlet = 128 MiB RAM and 400 MHz CPU power) for your Node.js application server and the rest will be managed by the platform automatically.

8. Manual Horizontal Scaling

You need to open the Topology wizard to scale the Node.js application servers in or out. Click on the + or – buttons inside the Horizontal scaling section to set the needed number of nodes. With the UKHost4u 6.0.4 version, you can modify the desired scaling mode:

  • Stateless: From the base image template creates all the new nodes side-by-side.
  • Stateful: copies the file system of the master container into the new nodes in order.     

The highest number of the same kind of servers inside a single layer of the environment depends on the specific hosting provider settings. 

For the proper distribution requests, a load balancer instance is added by default upon the Node.js server scaling.

9. Automatic Horizontal Scaling

Go to the preferred Environment settings and then click on the Auto Horizontal Scaling section. Now you can set up unique tunable triggers that let you increase or decrease the number of nodes because of the application load. Manage the kind of resource to be monitored, i.e., CPU, Network, RAM, Disk and the exact condition of scaling. 

Have a hassle-free Node.js hosting experience with the UKHost4u PaaS platform using its exclusive tools and features.

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.