Recently, I have been fascinated by the idea of building a digital micro-business and I started making efforts in this direction in my free time.

In the beginning, I was thinking of doing what I’ve been always doing for the last 15 years, and writing code to develop solutions to the problems I observed and collected with minimal effort. How hard could it be? I have been coding for many years, and I already had solid proof of being able to develop complex software that can deal with millions of users simultaneously. The challenge of developing small tools that can ease the lives of some seemed the easiest considering what I’ve done and built so far. I was confident.

However, my initial assumptions on how easy this could be were entirely wrong as I didn’t take into account one major factor, myself.

Habits

The corporate world guided, encouraged, and mentored me to write code that can be maintained by thousands of others. All the recognition I got so far, either in cash or in titles taught my brain how to make scalable, maintainable, fault-tolerant, high-performing, and reliable software. My brain wired very well what works in system design interviews and what does not. I’ve been getting paid to maintain a certain quality or to increase the quality for decades. I know very well, what raises eyebrows and what leads to a quick approval during a code review.

In the last 15 years, I never questioned any of these abilities and habits, as I’ve been getting my daily dose of positive reinforcement from the environment that I am.

Enlightenment

After spending two weeks perfectly architecting and developing a public API service, that I was hoping to turn into a micro-business, I ended up with; tens of different AWS services that work in harmony, a diagram explaining it, perfect documentation, codified and optimized cloud resources using Terraform, CI/CD pipelines that work just smooth, a bunch of Lambda functions having well-written and maintainable code, canary deployments, proper software development tooling, and a well-written test suite.

It took me literally two weeks to figure out how dumb this was.

The API was supposed to do the most basic thing in the world. Fetching data from a place, modifying it, and returning it to the user. Simple as that. Yet, I found myself blindly following corporate habits that were designed to function when working with others, while I was working on a tiny product alone.

After realizing none of these wasn’t needed at all, I decided to re-work the project and revisit all my decisions.

Pain of Change

First, I got rid of all codified resources and completely removed Terraform. Creating resources by hand took only four hours, which was significantly less than writing all those Terraform configurations. After this change, I was able to rapidly modify my infrastructure however I liked and by only clicking around a few times. This was a big improvement on the previous structure when it came to releasing speed and simplicity. Yet, wasn’t enough.

Later, I got rid of my multi-region architecture. Instead of managing resources in five different regions to achieve global low latency, I was happy to be only worried about a single region and relied on Cloudflare’s capabilities to achieve the same results, but with minimal effort.

Finally, I also got rid of the canary deployment flow that I spent a considerable amount of time creating and my CI/CD pipeline as it wasn’t needed anymore. Deployments? Well, I started creating a zip file anytime I wanted to change something and uploaded it using the Lambda UI of AWS!

I felt extremely uncomfortable at every stage of these changes as they were against what I knew was right for decades, and seemed like an anti-pattern - and I can tell how uncomfortable all these sounds for those who respect their craft as much as I do, but I was committed to keep simple things simple when building this pet project!

Bitter Recipe

Even though my aim was to revisit all my decisions in the prior stage, I wasn’t even aware of some decisions that I took unknowingly by relying on my habits and gut feeling. I realized this much later and only once I started being more skeptical.

VPS? A huge no. SQLite? Absolutely not. Pushing code changes using SCP? You must be joking! It took a ton of courage and a certain level of discomfort to admit that these assumptions were for corporate, instead of a tiny project that a single person is working on.

Realizing the fact that corporate practices that were designed to scale can do no good when the goal is to build products for hundreds, not even thousands, unlocked a territory in my brain that I abandoned decades ago. Also, realizing that being able to switch between speed and perfection could be a superpower when used properly, was totally freeing and worth investing in.

After admitting the bitter recipe, I destroyed all AWS resources I created over tens of different services, and deleted all the Lambda functions I created. In the end, all I had was a 5$ VPC on Hetzner and a single app.js file that is capable of handling four different API endpoints I have.

Building on Simplicity

Once I created a VPC with Ubuntu installed, I managed to set up Nginx, MySQL, logrotate, fail2ban and a few other things, but most importantly my own monitoring infrastructure (Grafana, Prometheus, loki, promtail, and a bunch of Prometheus exporters) in a single day. Later, I deployed 3 different web applications on this tiny 5$ VPC using pm2 in a few hours.

Hetzner

It was amazing to see 4 GB of RAM and 2 CPU cores being able to host Nginx, MySQL, 1 NodeJS app, 2 NextJS apps, more than 10 different API endpoints, Grafana, a bunch of background jobs - and still handle 280 requests per second. 16800 requests per minute is beyond what I’ve needed for a tiny side project that gets around 100 unique visitors per day.

Today, I am proud that the Holiday API and latency test that I developed are up and running, and are already getting some traffic.

I feel the super-power that I gained when reminding my brain that simple things should be simple was the ability to switch between speed and perfection. And I plan to build on this super-power in the future.

Until next time.