Author: withinboredom

  • Linux Kernel: A Single Point of Failure

    The last 24 hours have been an absolute disaster of downtime for me. I’m talking about servers being down kind of downtime, not the netflix-and-chill kind of downtime. The end result of this is that I discovered a new (to me) single point of failure This blog is one of several things that run on…

  • Hello, Swytch Framework

    Hello everyone! Several years ago, I embarked on a journey to build an app in PHP 8. To have some fun along the way, I decided to throw out ‘established’ and ‘entrenched’ ideas in software development. So, I experimented and questioned everything. The original app still isn’t done. I’m not sure when, if ever, it…

  • I don’t know why ‘spaces’ won against ‘tabs’

    I spent five years in a codebase with tabs instead of spaces. In my editor, I had indents set to 2 spaces. GitHub annoyingly defaults to 8 and requires customization in order to fix that. Because of the prevalence of spaces, we often had to maintain forks of tooling to support tabs because ‘spaces has…

  • The Cargo Cult of TCP_NODELAY: When to Use It

    I learned a ton writing this post, especially about how HTTP2 works and how its binary format affects network performance. Hopefully you’ll learn something here as well! What is Nagle’s Algorithm My last post kinda exploded on Hacker News while a raging debate on TCP_NODELAY went on. It was wildly interesting to see the two…

  • Golang is evil on shitty networks

    This adventure starts with git-lfs. It was a normal day and I added a 500 MB binary asset to my server templates. When I went to push it, I found it interesting that git-lfs was uploading at 50KB per second. Being that I had a bit of free time that I’d much rather be spending…

  • [Solved] A 2-day adventure in networking, Windows, IPv6 and WSL

    My servers all are IPv6-only, or they would be if I didn’t use WSL. I’ve always preferred Windows to virtually anything else, but I like the Linux command line better. (I’m not too fond of PowerShell… and that’s a hill I’m willing to die on.) So, back to the story. I finally got absolutely tired…

  • Building the fastest PHP router ever

    Ok, so the title might be a little bit click-baity since I haven’t compared it to every router in existence. Just nikic’s Fast Route. On my sabbatical last summer, I was messing about with microservices (which I’m convinced are evil, but that is an article for another day). During that, I decided to create a…

  • Exploring the performance of FrankenPHP

    Exploring the performance of FrankenPHP

    Hi! This post is pretty old (like when FrankenPHP was alpha software) and needs to be redone! All the memory leaks have been squashed, and can do about 15k+ reqs per second and can completely saturate a network/cpu package, as of 1.0.3. The original post is below. If you live in the PHP world, you’ve…

  • Wait, a 304 reply can change headers?

    Wait, a 304 reply can change headers?

    This evening I was optimizing some caching things for a web app I’ve been working on when I discovered something obvious when you think about it. Now, this is specific to Chrome-ish browsers and Firefox; I have no idea what will happen in Safari. Imagine the following PHP code: This code sets a random integer…

  • Algorithms in PHP: Deques (circular buffers & linked lists)

    In the previous post, I talked about priority queues. But in my explanation of an alternative implementation, I neglected to mention a few things: The alternative implementation isn’t for production; there are edge cases and unhandled errors. The alternative implementation is meant for a short queue, not an infinite one, such as the one you…