Just another test of technology. Cloudflare R2. Something that most cloud developers enjoy, a place to store objects and wow S3 was revolutionary. And still is. Just that, price point is not that attractive for a small time junkie dev.
So I got involved in something peculiar around 4 years ago where Clouddlare and Backblaze announce something great. Object storage, traffic layer via Cloudflare CDN equals to free traffic forever (as long as you did not clear the cache so that Cloudflare dont have to pull again from real Blackblaze endpoint). I got my hands into writing something amazing. In Node.Js, a method to upload and return the object url that already served under my domain in Cloudflare. Now, this is a bit harder to setup since you have a lot of things to configure on Cloudflare and their UI is not the best in the world. But hey, it works. So after doing that, I feel I wanted more and that’s when I started to write a plugin for Ghost Blog.
a picture of me, showcasing Cloudfare R2
Bad idea. Halfway through writing some logic, extending Ghost image storage adapter, I found out that somebody already made very similar thing and boy that saved my precious time. Well, I appreciate the effort but the person did not document it quite well to make it very seamless process to git pull the plugin into Ghost Blog, run some config and have it running in a very short time. So I did my best, hunting pull request on just a very stupid thing, Readme.md. Easy achievements.
I used it for quite sometime on my personal blog until I feel, eh this can be utilize for something greater. Low cost tech blog with multiple writers and yup I proved myself this thing can go miles. Ghost is a great blogging platform on it’s own. Especially you self hosted it and control your data. But want to have something very easy to transport away here and there.
I started the tech blog, known as Kaki Tech (yup the domain is Kaki.Tech). Clean UI, easy for my fellow friends to write, upload images without having to think so much. It just works. All for a very low cost of $22/year. Hosted in Hong Kong, but CDN help to bring the content to closer region, SIN. Everything is blazing. If I need to move, just dump the DB. Go to another server, install Ghost, install and restore database, and everything got restored in no time and I don’t have to think about other objects/media, same hotlink working without any changes. $0 charges. Sweet sweet thing about cloud object storage. Will have to thank Amazon for revolutionizing this thing.
And I stoped. Pendemic. I can’t afford $22/year hosting, because I’m using the money for Rise of Kingdom. Yeah. I needed that due to heavy lockdown. End up the project died and I feel like, hey at least I achieved something at this scale. Mind you, my friend manage to convince a guy from Astro Malaysia and they are going to make a plan, buying our blog space for advertising or even take over fully.
And then what? In 2022 I learned about Cloudflare R2, but I don’t have any interest in it since it’s the same thing with what I did before, but a bit straight forward. Tried a couple of things and that’s it. But when I started my personal blog once again, I realized, this could be a good idea to host images for no charge, and basically almost free for life unless I managed to shove over 10GB of media or go viral. But I don’t think it will reach to that point and even so if it reach, well, just have to pay. Kek. But here’s the thing, we have free tier limit of 10 million requests per month to do the GetObject. Which means, if we have 1000 images on a page and we have 1000 visitor, yup my quota is gone. Compared to Blackblaze last time, no charges at all for this operation! But the pricing is still very fair and cheap enough. GetObject is class b operation and after 10 million calls, they charge $0.36/million.
As I’m writing this, I’m designing something to help me upload to R2 easily. I’m thinking about writing a VSC plugin that can be just, right click, browse media, upload and auto paste the link here. What do you mean?!!! I mean ![yo](url)
. Yes my blog is markdown based. I’m using Hugo afterall and boy it’s super nice to just write, compile and go live in a very short time. But yeah, main issue now is that I’ve never written VSC plugin before, so that’s gonna be huge challenge but fuck yeah, lets do this. Give me 3 years to finish. Hah
Looking forward to speak with my best assistant, to help me code 90% of it. Hello ChatGPT!