InfraMaxx

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.

Start with the first lesson

All 40 lessons

  1. MVCC snapshotBeginner · 5 min

    An MVCC snapshot determines which row versions a PostgreSQL statement or transaction can see.

  2. VACUUMBeginner · 5 min

    VACUUM reclaims dead tuple space for reuse.

  3. HOT updateBeginner · 4 min

    HOT update updates rows without extra index entries when possible.

  4. WALBeginner · 4 min

    WAL records changes for crash recovery and replication.

  5. Isolation levelsBeginner · 4 min

    Isolation levels control permitted transactional anomalies.

  6. Row locksBeginner · 4 min

    Row locks serialize conflicting row changes.

  7. DeadlockBeginner · 4 min

    Deadlock occurs when transactions hold cyclic blocking dependencies.

  8. Connection poolBeginner · 4 min

    Connection pool limits reusable database sessions.

  9. Streaming replicationBeginner · 4 min

    Streaming replication ships WAL to standby servers.

  10. Logical replicationBeginner · 4 min

    Logical replication replicates published row changes.

  11. Point-in-time recoveryBeginner · 5 min

    Point-in-time recovery replays WAL from a backup to a target moment.

  12. Replication slotBeginner · 4 min

    Replication slot retains WAL until consumed by a subscriber.

  13. 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.

  14. Redis expirationBeginner · 4 min

    Redis expiration removes keys after a TTL.

  15. Redis sorted setBeginner · 4 min

    Redis sorted set stores scored members in rank order.

  16. 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.

  17. 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.

  18. 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.

  19. 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.

  20. 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.

  21. 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.

  22. 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…

  23. 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.

  24. 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.

  25. 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…

  26. 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.

  27. 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.

  28. 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.

  29. 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.

  30. 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.

  31. 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.

  32. 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.

  33. 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.

  34. 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…

  35. 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.

  36. 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…

  37. 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.

  38. 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.

  39. 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.

  40. 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.