Self-Host vs SaaS: The Actual Tradeoffs

The “self-host everything” movement has passionate advocates on both sides. Reality is nuanced. Here’s the framework I use when deciding. Cost isn’t the main factor Many self-host advocates lead with cost savings. Usually it’s misleading: SaaS at small scale is often free or cheap ($0-50/mo) Self-hosting on cheap VPS starts around $5/mo But self-hosting eats engineer time — 2-10 hours/month for maintenance At $100/hr engineering time, self-hosting often costs MORE than SaaS Cost-wise, self-hosting wins when you’re either: ...

October 22, 2024 · 3 min · Besterry

Terraform State Locking: Why You Need It and How It Goes Wrong

Terraform state without locking is a bug waiting to happen. Two engineers running apply simultaneously can corrupt state in ways that take hours to untangle. Here’s what I learned after one such incident. Why state locking matters Terraform reads state, computes a plan, and writes new state. Without locking, two concurrent runs can: Both read the same initial state Both compute their plans based on it Both write conflicting state — last one wins Now state doesn’t match real infrastructure The symptoms are weird: resources exist but Terraform wants to create them again. Or state references resources that were already destroyed. ...

September 18, 2024 · 2 min · Besterry