I shipped a small side project last winter. The app itself was fine. The bill was not.
It was a Node API, a Postgres instance, and a static front end. Nothing heavy. But by month three I was paying more for the server than I'd spent on the domain, the SSL setup, and the logo combined. Not because traffic exploded — because I'd over-provisioned on day one and never went back to look.
Here's what I actually changed, in the order I'd do it again.
1. I measured before I resized
I had no idea what my app actually used. I was guessing. So I put a five-minute cron job on the box that logged CPU, memory, and disk every minute into a text file, then looked at it a week later.
The result was embarrassing. Peak memory was 380MB on a 4GB box. CPU never crossed 12% except during deploys. I was paying for headroom I never touched.
If you take one thing from this post: measure first, resize second. Resizing blind is how people end up with a broken app and a bill that didn't move.
2. I moved the database off the same box as the app
This one surprised me. Co-locating the database with the app felt efficient — fewer moving parts, lower latency. But it meant I couldn't scale one without the other, and it meant every restart of the app touched the database process too.
Splitting them let me run a genuinely small app instance and keep the database on a modest managed plan. Total cost went down, and deploys stopped being scary.
3. I stopped paying for idle
The biggest single line item was a staging environment I "needed." I used it maybe twice a month. I now run it only when I'm actively testing, and tear it down the same day.
If your provider charges by the minute or the hour rather than by the month, this is free money. If it charges monthly, ask whether they have a stop-without-delete option. Many do and don't advertise it clearly.
4. I moved egress-heavy assets to a CDN
Static files, images, and the build output were being served straight from the app server. Every image request was a request hitting my instance and counting against my bandwidth allowance.
Pushing those to a CDN cut bandwidth usage by roughly 70%. The app server now handles API calls and nothing else, which is what it's good at.
5. I read the pricing page properly, which I should have done first
This is the unglamorous one. I'd assumed "traffic included" meant what I thought it meant. It didn't. The included allowance was per plan, overage was billed per GB, and internal traffic between services in the same network was free while external traffic was not.
That single paragraph of fine print explained about a third of my bill.
What I'd tell someone starting today
- Deploy small. Grow when the numbers say to, not when your anxiety does.
- Put the database somewhere you can resize independently.
- Turn off what you're not using, even if it's only for a week.
- Read the overage section of the pricing page before you deploy, not after the first invoice.
- If a provider won't tell you what your egress costs, that's the answer.
None of this is exotic. It's just the boring work of actually looking at what you're running. I put it off for three months because I'd rather write features than read invoices. The invoices won.
Disclosure: I work on infrastructure tooling now, which is partly why I finally sat down and did this audit. If you want to compare notes on how you sized your own setup, I'm genuinely curious — the numbers people share in comments are usually more useful than any benchmark.
Top comments (0)