Inside the server

A web server is more than "run node app.js." It's reverse proxying, process management, TLS termination, rate limiting, static file caching, and service supervision — all configured in files most developers never open. Click any line below to see what it does and why it matters.

Annotated production configs — every directive explained
Server configuration explorer
Click any line to see what it does
Every directive has a purpose in production
Server architecture
Client Browser / App HTTPS CDN Edge cache nginx Reverse proxy TLS termination Static files Rate limiting :3000 PM2 Cluster Node #0 Node #1 Node #2 Node #3 TCP Database PostgreSQL systemd manages this ↑

What this proves

Reverse proxy configuration

nginx sits in front of the application server, handling TLS, static files, and request routing. The proxy_pass directive forwards dynamic requests to the Node.js upstream while serving static assets directly — keeping the application server free for business logic.

Process management

PM2 runs the Node.js application in cluster mode, spawning one process per CPU core. If a process crashes, PM2 restarts it automatically. The exp_backoff_restart_delay prevents restart storms by progressively increasing the delay between restart attempts.

Security hardening

Production servers enforce TLSv1.2+, set Strict-Transport-Security headers, disable content-type sniffing, prevent clickjacking with X-Frame-Options, and rate-limit incoming requests to mitigate brute-force and DDoS attacks.

Service supervision

systemd ensures the application starts on boot and restarts on failure. The Restart=on-failure directive combined with RestartSec=5 provides a reliable process lifecycle without manual intervention — the foundation of self-healing infrastructure.

Performance tuning

worker_processes auto matches nginx workers to CPU cores. Gzip compression reduces bandwidth by 60-80% for text content. Static file caching via expires 1y eliminates redundant transfers. Together these directives can 10x a server's effective throughput.

Zero-downtime deploys

PM2's cluster mode enables rolling restarts — new code is loaded into fresh processes one at a time while old processes finish serving existing requests. Combined with nginx upstream health checks, deployments cause zero dropped connections.