-
If you have ever configured keepalived’s vrrp_script and been surprised by which node became master, this post is for you. The interaction between a script’s weight and a node’s base priority is subtle — and the keepalived documentation leaves many details underspecified. The only reliable reference is the source code. This post reads through it…
-
Nginx is renowned for its performance, but its internal architecture is equally elegant. Every HTTP request passes through a defined sequence of 11 phases, each handled by registered handler modules. Understanding how nginx processes a request at the source level reveals why nginx is so fast, so configurable, and so extensible. This post walks through…
-
Metaclasses are one of Python’s most powerful and most misunderstood features. The common explanation — ‘a metaclass is the class of a class’ — is technically correct but practically useless for understanding what actually happens when Python processes a class statement. This post does a real python metaclass deep dive by reading CPython’s type.__new__ implementation…
-
Python coroutines look magical from the outside. You write async def, you await something, and somehow execution suspends and resumes. But there is no magic. Everything is implemented in CPython as an extension of generator objects — with a handful of bytecode instructions and a frame evaluation mechanism. This post traces the execution of a…
-
If you have ever used Python’s asyncio library, you have interacted with one of the most sophisticated pieces of machinery in the standard library. But what is actually happening underneath the surface? How does the event loop know when a socket is ready to read? How does it decide which coroutine to run next? This…
-
Let me start with some Chinese characters. I’m setting up a website, hoping to consistently organize my several notebooks of source code reading notes.
-
The original intention was to create a tool to provide convenience for Weibo users, but due to limitations, it’s currently only suitable for personal use. The source code is open source.






