Ben Borgers

Thursday, January 13, 2022

January 13, 2022

šŸ‘‹ Iā€™m trying the idea of morning pages, where I write three pages in the morning of whateverā€™s on my mind. Itā€™s mostly for me, but Iā€™m publishing them too because why not.

All-hands-on-deck this morning

A couple days ago I built an API for a client, and at the time we calculated that itā€™d only be getting around 12 requests/minute. So I hosted it on Cloudflare Pages, which is still in beta, but while itā€™s in beta I can get 100,000 requests per day for free. Using this API around the clock would only incur around 17,000 requests per day, which was completely fine.

But I checked a dashboard this morning and realized that the API was getting 70-80 requests/minute, constantly. This would just barely overshoot the 100,000 request per day limit.

My brain went into stressed adrenaline mode, and I quickly filled out the form to request a higher limit from Cloudflare.

I asked the client about it, but in doing so realized that I was beholden to this beta limit for Cloudflare Pages, if the client ever wanted to scale further.

So I quickly converted the code into a Cloudflare Worker and paid for their $5/month plan, and then asked the client to update the endpoint to the Workers endpoint. Itā€™s a small unfortunate pain, but Iā€™m relieved that it could now scale infinitely if necessary. And that $5/month pays for the equivalent of 228 requests/minute already.

The client is going to switch over the URLs today, and then Iā€™ll take down the Cloudflare Pages deployment. Everything is okay once more. The temporary freakout wasnā€™t necessary, as usual.

My website is gonna go down today

Itā€™s also hosted on Cloudflare Pages, so it uses the same 100,000 requests per day quota that the client project does. The client project is set to blow through that limit in 4-5 hours, so around 2 or 3pm.

The usage resets at midnight UTC, so 7pm my time. So my website wonā€™t be working for a couple hours. (Also, itā€™s definitely my fault for having the hosting of the client project and my personal website interdependent on one another.)

Thatā€™s too bad, but itā€™s okay. Itā€™s just a website.

My brain wants ā€œdefault stacksā€

Iā€™ve noticed that my brain likes to have an answer to the question, ā€œIf I were to build an app/website right now, what tools would I use?ā€.

Itā€™s purely hypothetical, too. Of course, I should figure that out when I get there ā€” evaluate the specific problem, etc etc. But my brain doesnā€™t like that. It likes having the answer now, and switching it when necessary. Itā€™s like having a tribe that I can stick with, in some way.

This morning in the shower my brain decided that maybe my default stack for apps should go back to Laravel. Iā€™ve been trying for a month or two to go all-in on Remix, and while Remix is really nice, itā€™s hard to argue with the power of Laravel.

Of course, this doesnā€™t mean Iā€™m actually going to build something in Laravel right this instant. Itā€™s purely hypothetical and useless ā€” my brain just likes knowing which stack Iā€™d use.

Of course, itā€™s also really really early for Remix, while Laravel has been around for a while.

But almost nothing can compare with how Laravel gives you login/signup/forgot password, queues and background jobs, error reporting, and other things I canā€™t remember out of the box. Almost nothing can compete.

So maybe, when I pick up a side project to work on by myself, Laravel will be my new choice. For the sake of my brain, I need a good answer to this hypothetical question.

Whatā€™s this blog for?

I like the idea of having a whole catalog of thoughts and writing that people can read back through, if they want. I always enjoy stumbling on internet rabbit holes where someone has been writing prolifically on their own website, and I can just browse through a personal library and feel like Iā€™m getting to know them.

So I want to do that for myself. Itā€™s cool that other people can read this, but also itā€™s cool just to look back and browse at what I was thinking about.

Also, Iā€™d just like to write more. Even if itā€™s not particularly good, I think writing things down forces you to clarify your thoughts and put some weight behind things that would otherwise just be passing thoughts. Recognizing what things are going on inside my brain that I normally wouldnā€™t notice has been a cool side effect of writing these morning pages.

More blog posts

Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iā€™m working on!

Twitter ↗ RSS feed ↗