(no title)
lightning19 | 2 years ago
On the VM:
- Nodejs + React SSR
- Nginx
- Certbot to manage my SSL cert
- Integrated with Grafana's cloud service (free tier)
Outside of the VM:
- Managed MongoDB cluster
- API health check's every 3 min with email alerts (I use multiple uptime services to check from different regions) - DB backup cron jobs, backups are stored in 2 cloud providers
- Service desk for customer's to send queries/raise issues
- Alerts if CPU/RAM usage is too high (never got an alert for the past 2 years)
I also nuke the VM once a year and re-provision otherwise you have to maintain the OS, do cleanup etc.
Future work:
- Find way to backup my DNS records
- Probably need to monitor the SSL cert expiration in case certbot breaks
- CI/CD
anyfactor|2 years ago
> nuke the VM once a year and re-provision otherwise you have to maintain the OS, do cleanup etc
That is really interesting. What are you using to re-setup your entire infrastructure after purging a VM? How do you manage the down time between one vm purge to setting up the next one.
I would love to know, going beyond the VPS what is your total infrastructure + maintenance cost.
lightning19|2 years ago
I set things up again on the new VM manually. I have a runbook for it, usually takes me 30 mins or less.
To not have any downtime I keep the old VM up and attach a new public IP to the new VM. I then update the DNS records and after a while when the new IP is mapped to my domain I then stop the old VM.
Costs:
Managed Mongodb cluster: $9 but I share it between multiple side projects so let's say $3
API health checks - free! I use digital ocean and fresh ping
Service Desk - free! I use Jira
DNS: Usually $0.3
DB backups: within the free tier on both cloud providers. I have it set to only keep the last x backups so this should always be free
Cron job to run the backup: I have a serverless function for this, still within the free tier
SSL cert - free because I use let's encrypt
Docker image storage costs: <$1
Total ~$9.5