Writing & Videos — Page 10

Page 10 of 14: older articles, tutorials, and videos.

September 2025

Sep 29
Building a Redis clone in Go - Part 12 (Rewriting AOF files) thumbnail
YouTube

Building a Redis clone in Go - Part 12 (Rewriting AOF files)

I build the BGREWRITEAOF command for my Go Redis clone so the append-only file stops replaying outdated SET commands and keeps only the latest value for each key. I run the rewrite in a background goroutine, take a…

Watch →
Sep 26
Building a Redis clone in Go - Part 11 (EXPIRE and TTL) thumbnail
YouTube

Building a Redis clone in Go - Part 11 (EXPIRE and TTL)

EXPIRE and TTL need each key to carry its own expiry timestamp, so I change the store from a map of strings to a map of *Key structs holding the value and an expiry time.Time, then fix every handler that breaks. I add…

Watch →
Sep 24
Building a Redis clone in Go - Part 10 (AUTH and Passwords) thumbnail
YouTube

Building a Redis clone in Go - Part 10 (AUTH and Passwords)

I implement AUTH and password protection for my Go Redis clone by adding a requirepass directive, tracking authentication state per client, and blocking unauthenticated commands. I add requirepass to the config parser…

Watch →
Sep 23
Building a Redis clone in Go - Part 9 (RDB Checksum Protection) thumbnail
YouTube

Building a Redis clone in Go - Part 9 (RDB Checksum Protection)

I add SHA-256 checksum protection to the RDB save path in my Go Redis clone so a snapshot is only considered successfully written when the in-memory buffer and on-disk file hashes match. I encode the database to a…

Watch →
Sep 20
Building a Redis clone in Go - Part 8 (DBSIZE and FLUSHDB) thumbnail
YouTube

Building a Redis clone in Go - Part 8 (DBSIZE and FLUSHDB)

I implement the DBSIZE and FLUSHDB commands in my Go Redis clone, and I show why the obvious way to flush a database is the wrong one. For DBSIZE I take a read lock and return the length of the store map, while FLUSHDB…

Watch →
Sep 18
Building a Redis clone in Go - Part 7 (SAVE and BGSAVE) thumbnail
YouTube

Building a Redis clone in Go - Part 7 (SAVE and BGSAVE)

I implement the SAVE and BGSAVE commands in my Go Redis clone, after tightening the RDB layer: a read lock in saveRDB so snapshots don't race with writes, an os.O_TRUNC flag so every save overwrites stale data, os.Open…

Watch →
Sep 15
Building a Redis clone in Go - Part 6 (DEL, EXISTS, KEYS, & Concurrency) thumbnail
YouTube

Building a Redis clone in Go - Part 6 (DEL, EXISTS, KEYS, & Concurrency)

I fix the concurrency bug that crashed my Go Redis server the moment a client disconnected, then implement the DEL, EXISTS, and KEYS commands. Connections are now accepted in an infinite loop, handed to a goroutine…

Watch →
Sep 13
Building a Redis clone in Go - Part 5 (RDB Data Persistence) thumbnail
YouTube

Building a Redis clone in Go - Part 5 (RDB Data Persistence)

I implement RDB data persistence for my Go Redis clone by snapshotting the in-memory store to disk and reloading it on server start. I add per-snapshot trackers that count changed keys, use time.Ticker goroutines to…

Watch →
Sep 10
Building a Redis clone in Go - Part 4 (Append-only Data Persistence) thumbnail
YouTube

Building a Redis clone in Go - Part 4 (Append-only Data Persistence)

I implement append-only file persistence for my Redis clone in Go, showing how Redis can durably replay SET commands from disk instead of relying only on in-memory state. I explain the two Redis persistence approaches…

Watch →
Hassan Aziz pointing up

Dude, you’re at the bottom of my landing page.

Just book a call already if you’re that interested.

You scrolled all the way here.