Building High-Performance Node.js SSR Service: NetEase Open Course PC Migration Practice
The article describes how NetEase migrated its Open Course PC site from a legacy CMS to a high‑performance Node.js SSR architecture using Egg.js with TypeScript and Nuxt.js, detailing integration, caching, logging, error monitoring, middleware ordering, and achieving 338.6 TPS on a single 4‑core server.
This article documents the migration of NetEase Open Course PC website from traditional CMS-based architecture to Node.js with Server-Side Rendering (SSR). The original CMS system, while suitable for portal websites in the early internet era, became inadequate for managing complex content templates and fine-grained content management requirements.
The migration adopts a modern tech stack: Egg.js with TypeScript as the backend framework, combined with Nuxt.js for Vue-based SSR implementation. The author explains the rationale behind these choices: Egg.js provides enterprise-grade features including Koa2 inheritance, onion-model middleware, convention-based development, built-in multi-process management, and high plugin extensibility. Nuxt.js offers excellent SSR capabilities for Vue applications with automatic code splitting, powerful routing, hot reload, and HTTP/2 push support.
SSR brings two key benefits: improved SEO as search engine crawlers can directly view fully rendered pages, and faster time-to-content particularly for slow networks or low-performance devices.
The article details the implementation process including: creating Egg and Nuxt projects, integrating Nuxt as middleware into Egg, CMS template rendering support, cache optimization design (page caching, external data caching, rendering state sharing across processes via Agent process), log collection using egg-logger, error monitoring integration with Sentry, development debugging practices, and pressure testing results showing 338.6 TPS on a single 4-core 8GB server with 5-minute cache.
Key technical insights include middleware ordering optimization (distinguishing between pre-middleware and post-middleware based on their primary execution phase), and the three-tier Egg process architecture (Master, Agent, Worker) for state management.
NetEase Media Technology Team
NetEase Media Technology Team
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.