Subscribe
Fenix

Technologies, Hacks and Games...

Latest posts

Golang Tutorial 14: Channels, select and sync

Buffered and unbuffered channels, closing them, select with timeouts, WaitGroup.Go, a mutex the race detector is happy with, a bounded worker pool and errgroup. Runnable Go 1.27 examples and an exercise at the end.

7 min read

Hosting a static site on S3 and CloudFront with HTTPS

A private S3 bucket behind CloudFront with Origin Access Control, an ACM certificate from us-east-1 validated by hand at a non-Route 53 registrar, clean URLs with a CloudFront Function and a deploy script that invalidates the cache.

7 min read

GitHub Actions vs GitLab CI side by side

The same Go pipeline for shorty (lint, test with Postgres and the race detector, build and push an image) written for GitHub Actions and for GitLab CI, with every concept mapped across.

7 min read

Designing a distributed rate limiter with Redis

A rate limiter that lives inside one process breaks the moment you run three copies of the API. Here is a token bucket shared through Redis, made atomic with a Lua script, with a Go middleware and a plan for when Redis is down.

8 min read

Connection pooling for Postgres with PgBouncer

Running PgBouncer 1.26 in front of Postgres 18 in Docker: why raising max_connections isn't the fix, transaction vs session pooling, the session state that leaks between clients, prepared statements with pgx, and RDS Proxy as the managed option.

6 min read

Golang Tutorial 13: Packages and modules

Packages and modules in Go 1.27: go mod init and tidy, go.sum, exported names, internal/, versions and /v2 paths, replace for local work, go work workspaces and tool dependencies, all run for real with the output I got, plus an exercise.

10 min read