Software design and infrastructure
Hello there, I work with companies and teams all over the world to build and scale web applications in the cloud. Among my favorite tech stacks are PHP, GoLang, and JavaScript.
In here, I discuss my thoughts on building and running web applications. It's a pleasure to meet you.
Articles
Infrastructure management for several high-traffic PHP applications
This post describes how I manage the infrastructure for 50+ high-traffic PHP applications. Covering things like conatiners vs. serverless vs. servers, OPcache, zero-downtime deployments, and IaC.
Aug 8, 2023 13 min read
AWS to charge for public IPv4 addresses: Our options
AWS will begin charging for IPv4 addresses associated with AWS resources on February 1st, 2024. This will affect the infrastructure cost for serverless & serverfull. In this post, we look into the basics of networking, the problem with IPv4, and the challenges facing the transition to IPv6.
Aug 2, 2023 5 min read
The polyglot stack — PHP & GoLang
A polyglot stack uses multiple programming languages to solve problems. In this post, I highlight the problem with a PHP stack at scale and why adding GoLang to the mix can be helpful.
Aug 1, 2023 7 min read
Using GoLang's coroutines to handle Laravel jobs
We have a job that is dispatched over 50 million times per day in one of the Laravel applications I manage. I needed to start more Laravel workers to ensure these jobs were processed in a timely manner. However, starting too many processes may consume all of the machine's available memory. In this post, I'll show you how I used Go's coroutines to handle multiple jobs at the same time on the same machine.
Jun 6, 2023 8 min read
Defensive programming: the byzantine generals problem
Anything that can go wrong will go wrong. In software development, many things can go wrong. A developer must be familiar with the various components of software and the communication paths that connect them.
May 24, 2023 6 min read
AI and the future of programming as a profession
My predictions for programmers' future in 2030. When AI is sufficiently trained to create the majority of software tools and businesses.
May 22, 2023 5 min read
The six-dollar VPS
Most startups' and indie hackers' web apps can run on DigitalOcean's $6 VPS. It's inexpensive, dependable, and effective. In this post we will look into what you can get with a six-dollar VPS.
May 17, 2023 5 min read
Explaining the code on the "Go with PHP" website
In this post, I'm going to share with you a breakdown of how the code on gowithphp.com runs while refactoring it to make it more performant and less error prone.
May 15, 2023 9 min read
Go with PHP
If you haven't seen PHP code in a while, let me show you how it looks like in 2023. PHP has become faster, more secure, and more enjoyable to use. More importantly, development became more active. PHP is now a technology that can keep up.
May 10, 2023 2 min read
Asynchronous PHP — Multiprocessing, Multithreading & Coroutines
PHP code is blocking, meaning that one block of code will not run until the block prior to it has finished. In this post, we will look at our options for running PHP code asynchronously.
Mar 26, 2021 5 min read
Rationing Laravel's queue workers memory & CPU consumption
If you're running your queue workers on a server with limited resources, or a server that's also used to serve HTTP requests and do other tasks, it's important to ration the resource used by the workers. Let's see how we can do that.
Mar 10, 2021 2 min read
Common issues that cause Laravel's queue workers not to restart
If the worker doesn't exit after a restart signal and you checked its status, you'll find the uptime much longer. If that's the case, here are a couple of things to check.
Feb 19, 2021 2 min read
Avoiding memory leaks when running Laravel's queue workers
Avoiding memory leaks can be a bit challenging. Over time, some references will pile up in the server memory that won't be detected by PHP. In this post, we'll look at our options in dealing with this.
Sep 21, 2020 1 min read
Job batching in Laravel: How it works
Laravel 8 ships with a neat feature that allows us to dispatch a group of jobs to the queue to be executed in parallel. In this post, we're going to look into how this works under the hood.
Sep 7, 2020 3 min read
Queue workers: How they work
Understanding what happens under the hood when you run a queue worker.
Sep 7, 2020 9 min read
Explaining Laravel queue's configuration keys
In this series of video tweets, I've explained some of the most confusing Queue configuration keys
Sep 1, 2020 1 min read
How Laravel prevents your scheduled jobs from overlapping
Sometimes a scheduled job takes more time to run than what we initially expected. In most scenarios this is fine, but sometimes this should be prevented in order to guarantee correct data or prevent a high server resources consumption, so let's see how you can prevent such scenario in Laravel.
Apr 1, 2018 2 min read