Technology Stack
A frequent thought I have while visiting websites is what technologies they're using for it. This page lists all the technologies used for this site for people who have the same thought.
- Language: PHP
- Framework: Symfony
- Database: Postgres
- CSS Framework: Kelp UI
- Reverse Proxy: Nginx
- Server: Hetzner CPX11
Why These Choices
When I first started thinking about my personal website and what I wanted out of it, I had the following requirements:
- Stable.
- Lightweight.
- Wouldn't need constant babysitting.
Due to these requirements, I made the decision to pick each technology for various reasons.
PHP/Symfony
While working at my first job out of college, I was exposed to PHP and Symfony. I ended up loving Symfony, specifically for two reasons:
- Their backwards compatibility promise.
- Their release cycle.
These two reasons roughly summarize as: upgrading minor versions will only introduce deprecation notices and
new features, while each n.4 release gets bug/security fixes for 3 years.
This means I could safely run monthly updates without worrying about something breaking, and I wouldn't have
to upgrade major versions unless I wanted to.
Postgres
While there's a growing trend to "just use Postgres for everything", I specifically opted for it because of its rich feature set, not being tied to Oracle or Microsoft, and being truly open source. Additionally, they have a new major release roughly every year in Fall.
This means that every November I can worry about upgrading Postgres major versions, while every other November I can worry about upgrading PHP/Symfony major versions as needed.
Kelp UI
I know enough CSS to be dangerous, but I knew in order for me to be truly productive, I'd need to rely on a CSS framework/UI library. Thankfully, Chris Ferdinandi made a fantastic and lightweight UI library called "Kelp UI" and open-sourced it. It comes in at a whopping 12.1 kilobytes and is incredibly easy to extend when necessary. Plus, it natively supports light and dark modes and looks great without any customizations!
Nginx
With all the hype around Caddy and other reverse proxies, why would I pick an "old" reverse proxy like Nginx? It mostly comes down to the fact Nginx supports rate limiting and caching without requiring a custom build. Are the configuration files verbose? Oh yeah. Is it "annoying" needing to rely on Certbot to generate SSL certificates for my website then tell Nginx about them? Sure. But is there an immense peace of mind knowing that Nginx is rock solid, fast, and has custom cache rules depending on which page is visited? 100%!
Hetzner
I know some people are probably thinking, "why not use AWS/GCP/Azure?" The short answer? I don't want to. The long answer? I'm paying Hetzner ~$6.15 a month for a server with 2 VCPUs and 2GB of RAM. I can't even think about using a big cloud provider for that cheap. Do I have high-availability and multi-region deployments? No. Do I need either one of those things? No. With Nginx caching pages, this modest server should be able to handle plenty of requests. If for some reason a bunch of people visit this website and crash it, then oh well. It'll recover eventually and be back up.
Is there some manual overhead with this approach? Of course, I had to tweak the Nginx configurations to get them right and am responsible for setting up and securing a Linux server. However, Ansible makes that second part easy and the Nginx configurations don't have to change frequently, so the ~10 hours of time getting all that done made more sense to me than spending way more money on a cloud provider each month.