Infrastructure
What sits under an app: servers, containers, storage, backups, and the plumbing that decides whether it stays up.
81 posts · page 2 of 3
PM2 vs systemd: How to Keep a Node.js App Running on a Server
When you run node app.js over SSH and log out, your app dies. How PM2 and systemd keep it running, restart it after crashes and reboots, handle logs and environment variables — with working configs for both, and where Docker fits.
Node.js vs Bun vs Deno: Which JavaScript Runtime in 2026?
Three runtimes run JavaScript outside the browser. How Node.js, Bun and Deno differ on speed, compatibility, TypeScript support, security and built-in tools — and why most apps should still start on Node.js.
Finding Memory Leaks in Node.js: Heap Snapshots, Retainers, and Common Culprits
Your Node.js server's memory climbs until it crashes. How to confirm a leak, read process.memoryUsage, capture heap snapshots in production safely, compare them in Chrome DevTools, follow retainer chains, and fix the usual causes: unbounded caches, listeners, timers and closures.
Linux File Permissions Explained: chmod 755, 644, and "Permission Denied"
What rwxr-xr-x means, how chmod numbers like 755, 644 and 600 work, chmod +x for scripts, chown, the correct permissions for SSH keys, and why chmod 777 is never the right fix for "Permission denied".
How KVM Virtualization Works: The Isolation Behind Cloud Servers
Most cloud VMs run on KVM. How hardware-assisted virtualization works — VT-x/AMD-V, the VMM, virtio, two-level page tables — what a VM boundary protects against compared with containers, the remaining risks (side channels, noisy neighbours, steal time), and what shared vs dedicated vCPUs mean.
Horizontal vs Vertical Scaling: How Apps Handle More Users
Vertical scaling means a bigger server; horizontal scaling means more servers. How each works, what load balancers do, why databases are the hard part, what has to change in your app to scale out, and why most small apps should scale up first.
Health Check Endpoints: What /health Should (and Shouldn't) Check
A health check endpoint tells load balancers, orchestrators and monitors whether your app can serve traffic. Liveness vs readiness, what to check and what not to, response formats, timeouts, security, and examples for Express, Next.js and Docker.
Graceful Shutdown in Node.js: Handling SIGTERM Without Dropping Requests
Every deploy and restart sends your Node.js app SIGTERM. How to shut down gracefully: stop accepting traffic, fail readiness, finish in-flight requests, close keep-alive connections, drain workers, close database pools — plus the Docker PID 1 and npm start signal traps.
Encryption at Rest vs in Transit: What's the Difference?
Encryption in transit protects data moving across a network; encryption at rest protects data stored on disk. What each one protects against, what it doesn't, how HTTPS, disk encryption and field-level encryption fit together, and what a small app actually needs.
Do You Need Kubernetes? (Probably Not Yet — Here's How to Tell)
Kubernetes runs containers across many machines and is everywhere in job ads. What it actually does, what it costs to operate, the signs you might need it, and the simpler options that serve almost every small app and startup better.
DNS Propagation Explained: Why Domain Changes Take Time (and How to Speed Them Up)
You changed a DNS record and your site still points to the old place. What "DNS propagation" really is (caching, not spreading), how TTL controls the wait, why nameserver changes take longest, how to check from different places, and how to flush your own cache.
Cron Expressions Explained: What "*/5 * * * *" Means (With Examples)
A beginner's guide to cron syntax: the five fields, special characters, a cheat sheet of common schedules (every 5 minutes, daily at 9am, weekdays), the time zone and overlap gotchas, and where cron expressions show up — crontab, GitHub Actions, and app schedulers.
Zero-Downtime Deploys for a Small App
You don't need Kubernetes to deploy without dropping requests. What actually causes downtime during a deploy — stopping before starting, no health checks, killed requests, and database changes the old code can't handle — and the four practices that fix each one.
Why Is My Website Slow? A Beginner's Guide to Finding Out
Slow sites lose visitors. How to measure speed properly, what Core Web Vitals mean, and the usual culprits in AI-built apps — huge images, too much JavaScript, slow database queries, waterfalls of API calls, and a server far from your users — with a fix for each.
Where Should User Uploads Go? Object Storage Explained
Profile photos that vanish after a deploy, a database bloated with images, a public bucket full of private documents. Where uploaded files should live, how object storage works, and the three decisions — public or private, who uploads, and how files are served — that keep uploads fast and safe.
What Is "the Cloud"? Cloud Computing for Beginners
The cloud is other people's computers, rented by the minute. What cloud computing actually is, the difference between IaaS, PaaS, and SaaS, what AWS, Google Cloud, and Azure sell, how cloud billing works, and how much of it a first app really needs.
What Is Serverless? (There Are Still Servers)
Serverless means you write functions and the platform runs them on demand — no servers to manage, pay per use. What serverless really is, how it differs from an always-on server, cold starts, timeouts, and the database connection problem, and when it's the wrong fit.
What Is Docker? A Beginner's Explanation
Docker packages an app with everything it needs to run, so it works the same on any computer. What containers and images are, how they differ from virtual machines, why hosts and AI tools use them everywhere, and whether you need to learn Docker at all.
What Is a Server? A Plain-English Explanation
'Server' can mean a computer, a program, or a rented slice of a data centre. What a server actually is, what it does when someone visits your app, the difference between physical, virtual, and serverless, and why your laptop isn't a good one.
What Is a CDN? Why Your Site Loads Fast (or Doesn't) Far From Home
A CDN keeps copies of your site's files on servers around the world, so a visitor in Sydney doesn't wait for a server in Virginia. What a CDN does, what it can and can't speed up, how caching fits in, and the stale-content surprise that confuses beginners.
What Are WebSockets? Real-Time Features Explained
Chat, live notifications, multiplayer cursors, and dashboards that update themselves all need the server to push data to the browser. How WebSockets work, the simpler alternatives (polling and server-sent events), hosted real-time services, and what real-time needs from your hosting.
VPS vs PaaS: Where Should a Small App Live?
A VPS is cheap and does whatever you tell it — including nothing when it breaks. A PaaS runs your app for you and bills you for the privilege, often by usage. What each one actually includes, what it quietly leaves to you, and how to decide for a side project, an AI-built app, or a small business.
The Transactional Outbox Pattern: Reliable Events Without Dual Writes
Writing to your database and publishing an event can't be made atomic, so one eventually happens without the other. How the transactional outbox fixes it: polling relays vs CDC, ordering, at-least-once delivery, idempotent consumers with an inbox, cleanup, and monitoring.
Structured Logging: Logs You Can Actually Search
console.log('user saved') is useless at 3am when you need every request user 4812 made in the last hour. How structured logs work, what fields to include, request IDs that tie a request together, log levels that mean something, what never to log, and how logs make AI agents better debuggers.