System Architecture Notes

Thoughts on server deployment and performance optimization.

Optimizing Node.js for High Throughput

Published on February 28, 2026

Recently, I've been experimenting with different clustering strategies in Node.js to maximize request handling on multi-core systems. The default single-threaded nature of Node is well known, but utilizing the cluster module allows us to spawn worker processes.

One interesting finding was how IPC (Inter-Process Communication) overhead can actually degrade performance if workers communicate too frequently. The solution was to implement a Redis-based pub/sub model for shared state rather than relying on native IPC.

Next week, I plan to write a detailed benchmark comparing PM2 cluster mode versus native clustering in a Dockerized environment.

The Shift to Edge Computing

Published on January 15, 2026

Moving logic from the origin server to the edge (like Cloudflare Workers or AWS Lambda@Edge) has significantly reduced latency for our global users. By handling authentication and basic routing at the CDN level, we've reduced the load on the origin by nearly 40%.

However, managing state across distributed edge nodes remains a challenge. Eventual consistency is something you have to design around from day one.