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 articleThe 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.
- 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.
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.
liked, commented, and subscribed.
> 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.