This is the seventh part of the series Save yourself from a disaster: Redundancy on a budget.
In this post we will check about the “hardest” part of all of it, the money coming out of our pockets.
So, let’s crunch some numbers.
This guide won’t cover everything, it won’t be a comprehensive guide, and the steps that are shown need to be carefully reviewed and tested in your development/pre-production environment. I don’t take any responsibility for any damage, interruption of service nor leak/loss of data for the use of the instructions in the ebook (nor from any external website I’ve mentioned).
Original Cost
- DigitalOcean VPS: $5/mo x 12 = $60
- Setup hours: $0
Monthly Cost: $5
Annual Cost: $60
Upgrade Cost
- PremiumDNS: $2.88/yr x 5 domains = $14.4/yr
- DigitalOcean VPS: $5/mo x 12 = $60
- Hetzner VPS: โฌ3.04/mo x 12 = โฌ36.48 ($43.07)
- AWS S3: ~$0.07 x 365 = $26
- Setup hours: $? (fill here your cost time to follow this guide)
Monthly Cost: ~$12
Annual Cost: $143.47+
That’s more than 2x the original price you might say, and you’ll be not so wrong about it. Obviously, for different original prices, it won’t necessarily be 2x.
Cost Optimization
Note: The following optimizations will only be shown on the annual bill, if you take action immediately you’ll not reach 2x cost.
Let’s start cutting down what we really know is not necessary for our domains.
First, we need to visualize the spending:
Hetzner and DigitalOcean are the 2 biggest chunks of our spending (which was predictable). I’ll try to cover some scenarios to optimize the cost.
Reduce Backup Retention
My retention for AWS S3 was the following:
- 24 hourly backups
- 31 daily backups
- 12 weekly backups
- 3 monthly backups
I had 70 of them which were taking 3GB of space and costing just a few cents per year.
Avoid the Static Clone
This is the most space consuming on AWS S3 since it is a mirror of your websites. It is not necessary as we have redundancy on our services, it was done just a last resort in case everything burns down so at least we could serve to the user the static content to access the information (even though they cannot interact with the dynamic part of the website).
Scaleway Stardust VPS
These are good instances (if you can grab one), with a cost of $0.0025/hour will make a huge impact on our bill ($1.825/mo). Where’s the trick? We can only buy 1 in Amsterdam and 1 in Paris. And it is better not to run too much on these instances.
I did some experiment, and in my case, they weren’t performing as good as expected so I’ve picked 2 VMs from Hetzner.
Replace DigitalOcean
We could replace our $60 spending with an additional Hetzner VPS (in another region) and move from $96.96 to $86.14 (saving $10/yr).
The concern is that, even if we have a VPS in Germany and another in Finland, we are relying on ONE provider (I know, there’s vendor lock-in – but I have IaC fully configured so I can switch provider in a matter of minutes):
DNS Fallback
If you don’t have very important, or profitable, applications/websites, and given the frequency of a DNS going down you might want to save some money on this. If you have many websites the cost can become quickly high, even if it’s a few dollars per domain.
If you make money, it’s advisable to have a fallback DNS (or a premium service with guaranteed uptime at 100%), even because of the low cost (and impact on your bill).
Sum Up
I don’t run critical (nor very profitable) applications, so I can give up (at the moment) on having multiple cloud providers, to bring strong HA, in favour of saving some money.
This will increase my spending from $60 to $112* $88, which is not optimal (compared to the initial figure): it’s an extra $28/year (~$2.5/month – it’s just like a couple of coffees) to have peace of mind.
*Note: I’ve got some free credits on AWS so the backups are for free (at least for some time – not forever).
In the post Play with Providers, I’ll show how to cut down these expenses even more to a very acceptable level.
The next post will be about Manual Configurations, Stay Tuned.
Check out the whole version of this post in the ebook.