Node.js Web Server in Practice: Using PM2 Cluster Mode to Boost API QPS
Preface: pm2 is a Node.js process management tool. This article introduces pm2 cluster mode and uses it to boost Node.js API QPS.
Type to start searching
Preface: pm2 is a Node.js process management tool. This article introduces pm2 cluster mode and uses it to boost Node.js API QPS.
Preface: AutoCannon is a Node.js-based API load testing tool. https://www.npmjs.com/package/autocannon
Using sharp for image processing in Node.js — covering common image libraries, installation, format conversion, resizing, and the qiao-img wrapper package.
Preface: Downloading files is one of the most common features in Node.js, but in practice, file downloading can hide various pitfalls.
Preface: The fs module is the most common module in Node.js, but using fs often comes with various unexpected pitfalls.
Preface: The fs module in Node.js is familiar to most developers. This article compares the three ways to use the fs module.
Preface: In Node.js server development, there are scenarios where you need to get the public IP. However, the default method for getting the IP in Node.js can only retrieve the local IP, not the public one. This article explains how to get the public IP.
Preface: File upload is an essential capability in server-side development. In Node.js web server development, you can use formidable to implement file upload.
Preface: Scheduled tasks are an essential capability in server-side development. In Node.js web server development, you can use cron to implement scheduled tasks.
Preface: Local logging is an essential capability in server-side development. In Node.js web server development, you can use log4js to implement local logging.
Building a Node.js web server from scratch — covering HTTP module, URL parsing, query, headers, cookies, useragent, body parsing, file upload, CORS, redirect, and the qiao-z framework.