Track
Storage, Redis & Caching lessons
40 short lessons on Storage, Redis & Caching. Each one starts from a real situation, shows how it works, and ends with a quiz. Free to read.
All 40 lessons
- MVCC snapshotBeginner · 5 min
An MVCC snapshot determines which row versions a PostgreSQL statement or transaction can see.
- VACUUMBeginner · 5 min
VACUUM reclaims dead tuple space for reuse.
- HOT updateBeginner · 4 min
HOT update updates rows without extra index entries when possible.
- WALBeginner · 4 min
WAL records changes for crash recovery and replication.
- Isolation levelsBeginner · 4 min
Isolation levels control permitted transactional anomalies.
- Row locksBeginner · 4 min
Row locks serialize conflicting row changes.
- DeadlockBeginner · 4 min
Deadlock occurs when transactions hold cyclic blocking dependencies.
- Connection poolBeginner · 4 min
Connection pool limits reusable database sessions.
- Streaming replicationBeginner · 4 min
Streaming replication ships WAL to standby servers.
- Logical replicationBeginner · 4 min
Logical replication replicates published row changes.
- Point-in-time recoveryBeginner · 5 min
Point-in-time recovery replays WAL from a backup to a target moment.
- Replication slotBeginner · 4 min
Replication slot retains WAL until consumed by a subscriber.
- Caching: the cache-aside patternIntermediate · 5 min
How 36 milliseconds of database work per page view turns into one fill per product every five minutes, and the write order that stops the cache from serving old prices.
- Redis expirationBeginner · 4 min
Redis expiration removes keys after a TTL.
- Redis sorted setBeginner · 4 min
Redis sorted set stores scored members in rank order.
- Block versus object storageBeginner · 4 min
Explain how block storage and object storage differ in the kind of request they take, and choose the right one for a database versus a backup set.
- Filesystem durabilityIntermediate · 4 min
Explain why a successful write can still be lost in a crash, and how fsync and the rename pattern decide whether saved data survives a power cut.
- RAID tradeoffsIntermediate · 4 min
Explain what RAID 0, 1, 5 and 6 trade between speed, capacity and redundancy, and why rebuild time and backups matter as much as the level chosen.
- NVMe performanceIntermediate · 4 min
Explain how NVMe queues and queue depth shape drive throughput and latency, and read a benchmark's conditions before planning around it for a real database workload.
- I/O queue depthIntermediate · 4 min
Explain how queue depth limits throughput through Little's law, and use iostat and fio to find out whether a slow job is waiting on its own requests.
- Read write amplificationIntermediate · 4 min
Explain write and read amplification, why compaction and garbage collection add device writes, and how to measure the ratio before you size an SSD's endurance.
- Backup retentionIntermediate · 4 min
Explain how retention policies choose which recovery points to keep, and why forget, prune and a restore test all have to run before space is freed and recovery is…
- Snapshots consistencyIntermediate · 4 min
Explain why a snapshot taken during writes can be inconsistent, and how freezing writes and snapshotting all volumes together make a database snapshot usable on restore.
- Object lifecycle policiesIntermediate · 4 min
Explain how S3 lifecycle rules transition and expire objects by age, and why a rule added without a retention owner can delete records that must be kept.
- Multipart uploadsAdvanced · 4 min
Explain how multipart upload builds one object from numbered parts, and why unfinished uploads keep costing money until they are completed or aborted, even when they do…
- Redis data typesAdvanced · 4 min
Explain how Redis data types set the cost of each change and the memory a key uses, and why one JSON string per session is a poor fit for small updates.
- Redis eviction policiesAdvanced · 4 min
Explain how Redis eviction policies choose what to remove at the memory cap, and why a single instance shared by cache and session data can lose the wrong keys.
- TTL and stampedesAdvanced · 4 min
Explain how TTLs cause cache stampedes when keys expire together, and use jitter and a short rebuild lock to keep the database from taking the spike.
- Cache asideAdvanced · 4 min
Explain how cache-aside reads and writes can return stale data after a database change, and how deleting the cached key after the commit fixes most cases.
- Write through cachingAdvanced · 4 min
Explain write-through caching, where each write updates the cache, and why a failed cache write after a database commit leaves the two stores disagreeing silently.
- Cache invalidationAdvanced · 4 min
Explain how cache invalidation works through deletes, versioned keys and TTLs, and why a fact cached under many keys needs a dependency index to clear all of them.
- Redis persistenceAdvanced · 4 min
Explain how RDB snapshots and AOF differ in loss window, fsync policy and restart behaviour, and choose a setting from the loss the business can accept.
- Redis replicationAdvanced · 4 min
Explain how asynchronous replication copies writes to replicas, and why WAIT and a replica count lower the loss risk without making a write durable across failover.
- Redis ClusterAdvanced · 4 min
Redis Cluster splits keys across 16384 hash slots on several primaries. You learn how a slot is chosen, why multi-key commands need one slot, and why a failover can…
- Distributed locks caveatsAdvanced · 5 min
A Redis lock uses a TTL and a random token, and it can still fail when the holder pauses past the TTL. You learn why a fencing token protects the resource itself.
- Hot key mitigationAdvanced · 4 min
A hot key sends all its traffic to one node, so adding nodes does not help. You learn how to find the key and choose between a local cache, client-side tracking and key…
- CDN cache controlAdvanced · 4 min
CDN caching follows the freshness and storage rules in RFC 9111. You learn how s-maxage, ETag and private responses decide what a shared cache may store and serve.
- MinIO S3 compatibilityAdvanced · 4 min
MinIO implements the S3 API, but compatibility is a list of operations rather than a yes or no. You learn how to test each operation a tool needs before moving data.
- Data durability mathAdvanced · 4 min
A durability figure gives an annual loss chance per object, which multiplies out to expected losses at scale. You learn the arithmetic, and why it is not a backup plan.
- Recovery time objectivesAdvanced · 4 min
RTO and RPO are business targets for how long recovery takes and how much data may be lost. You learn how to measure both from real snapshots and timed restores.