Last year I was paying $340/month for infrastructure that served ~50k monthly active users. Today I pay $136/month for the same load. Here's exactly what I changed — zero code rewrites required.
The Problem With "Just Scale It"
When your app grows, the instinct is to throw more compute at it. Bigger instances, more replicas, auto-scaling groups. But scaling up is almost never the right first move.
The right first move is measuring what you're actually using.
Step 1: Audit Your Instance Utilization (Found: $80/mo savings)
I ran a 2-week monitoring period and discovered my "production" servers were averaging 11% CPU utilization. I was paying for large instances because I was scared — not because I needed them.
What I did:
- Downgraded from 4 vCPU / 8GB RAM → 2 vCPU / 4GB RAM instances
- Set up proper alerting so I'd know if load actually spiked
Tool used: DigitalOcean Monitoring (free, built-in)
👉 DigitalOcean's droplets start at $6/month and the monitoring is free. Way cheaper than AWS for typical apps.
Savings: ~$80/month
Step 2: Kill Idle Databases (Found: $60/mo savings)
I had 3 managed databases running. One was for a project I'd abandoned 8 months ago. One was a "staging" database that nobody used. Only one was actually needed.
# Quick audit — list all your databases and their last connection time
# In DigitalOcean: Manage → Databases → check "Last ping"
Delete the ones you haven't touched in 30 days. You can always restore from snapshots if needed.
Savings: ~$60/month
Step 3: Move Static Assets to Object Storage (Found: $45/mo savings)
I was serving images, videos, and PDFs directly from my app servers. This is expensive and slow.
The fix: Move everything to object storage (Spaces, S3, R2) + CDN.
Before: App server → user (slow, uses compute bandwidth)
After: CDN edge node → user (fast, costs fractions of a cent)
Object storage costs ~$0.02/GB vs. $0.10+/GB on compute bandwidth. For a media-heavy app, this adds up fast.
Savings: ~$45/month
Step 4: Optimize Your Database Queries (Found: $19/mo savings)
This one did involve looking at code — but not rewriting it. I just added missing indexes.
-- Before: 2.3 second query, full table scan
SELECT * FROM events WHERE user_id = 123 AND created_at > '2026-01-01';
-- After: Add composite index
CREATE INDEX idx_events_user_date ON events(user_id, created_at);
-- Same query: 12ms
Faster queries → smaller database instance needed → cheaper plan.
Savings: ~$19/month
Step 5: Use Reserved/Committed Pricing (Found: $36/mo savings)
If you've been running the same infrastructure for 6+ months, you're probably on on-demand pricing. Switch to committed pricing (1-year commitment) and save 20-40%.
I committed to my core infrastructure for 1 year and saved 36% immediately.
Savings: ~$36/month
The Full Breakdown
| Change | Monthly Savings |
|---|---|
| Rightsize instances | $80 |
| Kill idle databases | $60 |
| Object storage for assets | $45 |
| Query optimization | $19 |
| Committed pricing | $36 |
| Total | $240/month |
That's $2,880/year — back in my pocket, no performance regression.
Where to Start Tomorrow
- Open your cloud dashboard and look at CPU utilization graphs for the last 30 days
- List every database — if one hasn't been touched in 30 days, snapshot and delete it
- Check your bandwidth bill — if it's high, you're probably serving static files wrong
The best part? None of this requires a rewrite. It's just configuration and common sense.
Running on DigitalOcean and want to optimize? Their cost estimator and monitoring tools make this audit trivial. New accounts get $200 free credit — enough to experiment without risk.
What's your biggest infrastructure cost sin? Mine was definitely those zombie databases. Comment below 👇
Top comments (0)