How to save $13.27 on your SaaS bill
dgerrells.com
dgerrells.com
Obligatory HN footnote: My blog costs $6 a month to serve HTML from digital ocean. Landing in the top five links a few times on HN didn't make the Linux load blip much past 0.20. GoAccess analyzes nginx traffic logs for free, if you want to know what countries are scraping your pages.
You can install any SQL variant yourself on any web server. I can be on the SAME MACHINE. Even a vps! Boom!
Everyone used to do it all the time. For some reason everyone decided to pay more for less power and use the cloud instead.
You still won't go above 20% CPU for even moderately complex CRUD applications.
If you're really crazy you can add a cron job to send a backup each night to S3.
And it'll take you all of an hour to do that.
Cache-Control: max-age=600
that can’t be changed. Your assets should have much longer expiry and hopefully be immutable. Just get a server, it’s cheap and you can do proper cache control and you’re not beholden to your Microsoft overlord.Most you have is some HEAD requests.
I have also experienced this, during dial up period, I agree its not pretty and most dont even consider it.
Unfortunately IME it’s not a super well-polished product though (I can’t for the life of me get their CLI “wrangler” to login to a headless machine, and their HTTP APIs are not documented well enough to use for non-git file sources, so I can’t get it to work in my not-so-special dev environment setup). So it’s only better if you can get it to work, although that’s something you’ll probably figure out in the first 5-10m of using it.
"I sold my soul and all I got was a $5 virtual machine"
Time to jump ship
Their free tier gives you quite a lot of disk. The catch is being capped at 10Mbit, which can be mitigated by .. Cloudflare!
Using an offering from a specific company is not selling your soul. Selling your soul entails adopting something in a way that you become reliant upon it, giving whomever controls it leverage over you. The chief one these days is using Proprietary Software 2.0, and especially writing significant code that ends up inextricably wed to it. That can include the Oracle Cloud API, but it also includes every other lock-in-hopeful proprietary service API, including all of these "easy" and "free tier" offerings from not-yet-openly-associated-with-evil SaaS "startups".
So in short if you're choosing between some proprietary solution that offers "free" hosting (eg Heroku, Github pages, anything "serverless", etc) and Oracle free tier that gives you bog standard VMs on which you can run common libre software, choose the Oracle free tier route and don't think twice. If Oracle engages in "altering the deal", then the most you'll be on the hook for is $5/mo at a different provider rather than having to completely redo your setup.
Maybe they did it to have fun
Now what is maybe a bit strange is companies like Vercel having massive valuations because of this. I said in another comment somewhere does anyone actually use them beyond the free or low cost tiers?
At least the Heroku free tier could run all my apps. RIP
The function limit is particularly frustrstinb when you need route splitting to avoid slow cold starts or memory limits. I even hit this in a few Astro projects which was particularly suprising - when serverless rendering was an all or nothing option for Astro Vercel was effectively useless on Hobby plans.
This bundling also means fewer cold starts. Bundling is the default for Astro[2]. Also worth noting, on paid plans, functions are kept warm automatically[3].
[1]: https://vercel.com/docs/functions/runtimes#functions-created...
[2]: https://vercel.com/docs/frameworks/astro#configuration-optio...
[3]: https://vercel.com/changelog/vercel-functions-now-have-faste...
Its a bit of a crap shoot with third party frameworks though. With Astro, unless I'm misremembering the timing, they defaulted to bundling per route originally and only changed that when Vercel users ran into issues with the Hobby plan. More interestingly on the timing, I think that was right around the time Vercel took over as Astro's official hosting sponsor. Not sure how much a part that played in the change in defaults.
In general, I'm always hesitant with a build system that I depend on to route split in a way that impacts my actual cost to run. At the end of the day I have little say in how routes are split and little insight into what metrics are used at bundle time to make those decisions. That said, I haven't heard any horror stories with SvelteKit or NextJS on Vercel so the concern may very well be unfounded as long as I stay in the Vercel ecosystem.
2: Inefficient in what sense? In my experience, most of the latest software startups are shipping incredibly quick with Next.js / Vercel stack infra. TS/JS is still a much faster runtime (and only one with types) than the practical alternatives of Python, Ruby, and PHP. There is a single digit percentage shipping new startups in Java/C#. Go could make a decent case.
3: IMO the Next.js / Vercel deployment experience is far far better than what I dealt with wrangling Django templates / non-template integration / deploying anywhere else.
In Django VPS land, you can follow this guide and encounter multiple issues particular to your setup: https://www.digitalocean.com/community/tutorials/how-to-set-...
and figure out Dokku deployments or GitHub action CI issues.
On Next.js / Vercel, you can:
1: Click a button linking github and Vercel.
2: Enter .env on Vercel
3: git push
liked, commented, and subscribed.
(I wonder what the n-gate author is up to? I hope they're happy and doing something fun. I miss their HN summaries...)
> I am open to ideas on why this happens but my guess is because bun isn't written in rust.
LOL classic. I love Rust and I enjoy when people take the piss out of us fans.
I do use SQLite every now and then but I'm always surprised by how low-latency and high-throughput it is. I have bad intuition for how efficient it is. Good stuff!
I really like this author's writing style. It feels like I'm reading my own inner monologue.