Loading course…
Loading course…
Created by Shaunak Ghosh
Build a ByteByteGo-style scaling playbook: measure bottlenecks, optimize queries and indexes, then add pooling, Redis caching, read replicas, and sharding without breaking correctness. You’ll also learn how to validate real limits with P99 benchmarks and design for recovery using replayable change streams.
8 modules • Each builds on the previous one
Build a scaling plan by mapping workload (QPS, read/write mix, latency SLOs) to observable bottlenecks (CPU, I/O, locks, buffer cache, network, connections). Learn a minimal measurement toolkit: slow query logs, database metrics, and load-test patterns that approximate production.
Optimize indexes for real access patterns: selectivity, composite index order, covering indexes, partial indexes, and avoiding redundant indexes. Include the write and maintenance cost of indexes and how they affect vacuuming/compaction and lock behavior.
Use EXPLAIN/ANALYZE (or equivalent) to tune joins, filters, aggregations, and pagination patterns. Learn to spot common plan pathologies (full scans, bad join order, misestimates) and tie fixes back to schema, indexes, and query shape.
Improve write throughput by reducing lock contention and transaction overhead (batching, idempotent upserts, shorter transactions, isolation choices) while controlling database connections via pooling. Cover pool sizing, timeouts, and backpressure to prevent connection storms.
Apply Redis as a caching layer using cache-aside/read-through/write-through patterns, TTL strategy, and invalidation approaches. Address production pitfalls: cache stampede, hot keys, consistency boundaries, and safe fallback behavior during cache outages.
Scale reads with replicas while managing replication lag, read-after-write consistency, and routing. Learn patterns for read/write splitting, session consistency, and safe fallback during replica degradation or failover.
Scale beyond a single node via partitioning (range/list/hash) and sharding (routing layer, consistent hashing). Cover shard key selection, hotspot avoidance, resharding, and limitations around cross-shard joins and transactions.
Design for failure: backups and PITR, failover strategies, retry/circuit-breaker behavior, and minimizing blast radius. Include operational readiness practices: runbooks, chaos testing, and validating recovery time (RTO) and data loss (RPO).
Begin your learning journey
In-video quizzes and scaffolded content to maximize retention.