Building a One‑Stop Serverless Node Service Management Platform: Architecture, Development, Deployment, and Monitoring

This article describes the design and implementation of a Serverless‑based one‑stop node service management platform, covering its full‑stack engineering architecture, frontend and backend project organization, logging, process monitoring, one‑click deployment, and a comparison of Serverless solutions, while sharing practical challenges and technical solutions.

58 Tech
58 Tech
58 Tech
Building a One‑Stop Serverless Node Service Management Platform: Architecture, Development, Deployment, and Monitoring

Background Serverless offers elastic scaling, on‑demand usage, and zero‑ops, but fully leveraging its advantages requires practical exploration. The SFF (Serverless For Frontend) platform provides an end‑to‑end node service solution that addresses four pain points: lack of elastic scaling, difficulty migrating to function‑type services, absence of unified build/deploy processes, and insufficient monitoring and troubleshooting tools.

Full‑Stack Engineering Solution The platform’s scaffolding creates separate client and server directories, each with its own package.json, decoupling dependencies. A custom static‑resource plugin egg-wb-static enables seamless front‑end/back‑end integration without mock data, allowing hot‑reloading during development and unified deployment of static assets to CDN.

Frontend Engineering Solution Webpack is used as the build tool. Three approaches are discussed: 1. Minimal scaffolding with independent project builds. 2. Global scaffolding that also provides webpack configuration and dependencies. 3. A hybrid solution combining the benefits of both, allowing unified dependency upgrades while keeping projects independent. Each approach’s advantages and drawbacks are analyzed.

Log Handling A standardized log output module is provided for consistent log formatting. A middleware records every request automatically. Logs are collected via Docker’s stdout, forwarded to the host, aggregated by Fluentd, shipped to Logstash, stored in Elasticsearch, and visualized in Kibana.

Process Monitoring The platform gathers memory usage via process.memoryUsage() and CPU usage via process.cpuUsage() combined with high‑resolution timers. CPU profiling is performed with v8‑profiler, producing flame‑graph data. Collected metrics are stored in MongoDB and, when needed, snapshots and profiles are uploaded to cloud storage.

One‑Click Deployment A CLI tool invokes the platform’s APIs to automate image building, static‑asset deployment, and node service rollout. Authentication is handled via a unique secret key generated on the platform and stored in MongoDB, allowing the CLI to act on behalf of the user without cookies.

Serverless Solution Comparison The article compares traditional web‑service functions with Serverless functions, discusses cold‑start mitigation by keeping one instance alive, and outlines a unified log format integrated with the company’s ELK stack for monitoring and performance analysis.

Summary The SFF platform demonstrates how Serverless can be effectively applied to full‑stack node services, providing scaffolding, unified build/deploy pipelines, comprehensive monitoring, and logging, thereby improving developer productivity and operational efficiency across multiple business lines.

{
  "functionName": "(root)", // function name
  "url": "",
  "lineNumber": 0,
  "hitCount": 0,
  "id": , // node id
  "children": [] // child nodes
}
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Cloud NativeServerlessNode.js
58 Tech
Written by

58 Tech

Official tech channel of 58, a platform for tech innovation, sharing, and communication.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.