July 29th, 2024

How to save $13.27 on your SaaS bill

The author discusses managing costs with Vercel's analytics, converting images to reduce charges, and building a custom API using SQLite. They faced deployment challenges but plan future enhancements.

Read original articleLink Icon
FrustrationAmusementAdmiration
How to save $13.27 on your SaaS bill

The author shares their experience of managing costs associated with Vercel's analytics product after transitioning to a pro plan. Initially, they faced unexpected charges due to high outbound data usage from large PNG images on their website. To mitigate costs, they converted the most data-heavy images to JPG format. After implementing Vercel's analytics, they found the service easy to integrate, requiring minimal code changes. However, they were surprised by the subsequent bill of $28 after a week of usage.

In an effort to save on analytics costs, the author decided to build a custom analytics API using a new stack they termed the "Squeeh stack," which utilizes SQLite for data storage. They quickly set up a local API and conducted load tests, achieving impressive request rates. Despite SQLite's limitations, they implemented batch processing to optimize data insertion.

The author faced challenges deploying the API on DigitalOcean, initially attempting to use Docker but ultimately opting for a bare-metal approach. After some setbacks, including being blocked from their VPS due to high traffic, they successfully established the API. They plan to enhance the analytics service by adding session tracking and refining data collection methods, while also considering future improvements like IP geolocation. Overall, the author reflects on the learning experience and the potential for cost-effective analytics solutions.

AI: What people are saying
The comments reflect a mix of opinions on the author's approach and the tools discussed in the article.
  • Several commenters express frustration with the complexity and cost of modern web hosting solutions like Vercel.
  • Some users share their own experiences with building custom analytics and hosting solutions, often finding them more cost-effective.
  • There is appreciation for the author's writing style and humor, with some comparing it to their own inner thoughts.
  • Comments highlight a general skepticism towards the necessity of "bleeding edge" technologies in simple projects.
  • Some users suggest alternative tools for image optimization and analytics, indicating a desire for more efficient solutions.
Link Icon 14 comments
By @Eiriksmal - 4 months
This makes me tired. I know it's supposed to be humorous self deprecation, but it's soul crushing to see the pseudo real-time thought process behind the fantastically over-engineered setups from my day jobs. All for someone's humble blog?

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.

By @cr125rider - 4 months
I’m very impressed that Vercel is able to sell so little for so much. They do the very bare bones hosting and charge a fortune to run everyone’s inefficient JavaScript framework of the month to replicate the speed and simplicity of a static site. Amazing.
By @inhumantsar - 4 months
> I live on the edge, the edge of the network, the browser, the bleeding edge. Everything must be serverless, multi-region, edge delivered, eventually consistent, strongly typed, ACID compliant, point in time recovery, buzzword buzzword, and buzzword bazzword.
By @c0balt - 4 months
The writing style is gold. The technical approach too was quite entertaining.
By @zygo - 4 months
I also did the same, built my own analytics with TinyBird for one of my projects (https://linkycal.com). It ended up costing less than paying for a hosting provider
By @cqqxo4zV46cp - 4 months
> I am open to ideas on why this happens but my guess is because bun isn't written in rust.

liked, commented, and subscribed.

By @renewiltord - 4 months
This was a fun read, haha.

> 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!

By @theseagin - 4 months
I quite liked the blog. Minus all the bleeding edge stuff, I build an analytics website for me a few months ago and it was quite fun. Later extended it to included some real time insights on the performance of my sites.
By @coffeekitkat - 4 months
I like the writing! I enjoyed the reading of it.
By @ctippett - 4 months
Another saga from the gypity chronicles!

I really like this author's writing style. It feels like I'm reading my own inner monologue.

By @Havoc - 4 months
Some of that style/humour reminds me of primeagen
By @mrcartmeneses - 4 months
Clearly the author has never heard of tinypng.com
By @throw0101a - 4 months
Somewhat disappointed they could not save an extra dime (10¢; $0.10):

* https://en.wikipedia.org/wiki/Leet