Skip to content
项目

关于

学习并掌握 Node.js:V8、libuv、事件循环、缓冲区、流、异步内部机制、性能、安全、部署和生产架构。

安全与隐私

这些数字如何统计

实测星标增长

24小时
0
7天
+1
15天
+1
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

NodeBook

[!TIP] For better experience, I'd recommend reading it on the NodeBook Website or if you prefer getting the slides and reading an e-book version (ePUB and PDF - both dark/light). You can download the digital bundle here: NodeBook Digital Bundle

NodeBook Cover

NodeBook is my my way of explaining everything about Server side developement using Node.js, it's internals and the parts that matter when apps misbehave.

I started writing it because most Node material stops too early. You learn routes, middleware, promises, maybe some streams, then the hard parts get left as "go read the docs" or "profile it". Memory leaks, slow requests, blocked event loop, file descriptor limits, weird DNS behavior, broken backpressure, GC pauses, module loading issues. That is where Node starts getting interesting.

This repo has the public chapters. Some are finished, some are still being edited, and some parts will probably move around.

If you're brand new to JavaScript, this may be a bit much. You can still read it, but it assumes you know the basics and have written some Node before.

Why

You don't need V8 internals to ship a small app.

Run Node in prod long enough and the internals stop feeling optional. The event loop, libuv, buffers, syscalls, TCP, thread pools, GC, module resolution, process signals, they all show up in bugs.

Node is also easy to poke at. Write a small script, run it, profile it, break it, change one thing, run it again.

What is inside

NodeBook is planned as four volumes, 38 topics, and around 200+ sub-chapters.

You don't have to read it from page one. Pick the part you're dealing with. Streams, files, modules, networking, async behavior, perf, prod work, whatever.

Structure

Volume I covers the runtime basics. What Node is, V8, libuv, event loop phases, microtasks, process lifecycle, buffers, streams, files, modules, and async patterns.

Volume II is about building with Node. Worker threads, child processes, clustering, crypto, HTTP, TLS, databases, queues, and the places where small choices get expensive later.

Volume III is performance and debugging. V8 optimization, hidden classes, inline caches, deopts, garbage collection, heap snapshots, flamegraphs, event loop delay, and memory leaks.

Volume IV is prod Node. Deploys, logs, metrics, security, scaling, incidents, and keeping services understandable after they've been running for a while.

Status

Volume I is completely done. The rest is being written and reviewed.

There are runnable examples and small labs where they make sense. If something is wrong or unclear, open an issue or PR.

Links

Read the book at thenodebook.com.

Main repo: github.com/ishtms/nodebook

Complete Chapter Index

01. Node.js Architecture

02. Buffers & Binary Data

03. Streams

04. File System

05. Process & OS

06. The Module System

07. Async Patterns

08. Runtime Platform APIs & Tooling

09. Network Fundamentals with Node.js

探索相关项目

加载中…