← ben.cv

Thursday, January 13, 2022

January 13th, 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.