Guided Lab Brief

Database Replication & Read Scaling

Add read replicas to scale database reads and add failover for high availability.

Overview

Add read replicas to scale database reads and add failover for high availability.

Your single database is the bottleneck.

You will build 6 architecture steps that model production dependencies.

You will run 1 failure experiment to observe bottlenecks and recovery behavior.

Success target: Reads distributed to replicas, primary handles only writes, failover is configured.

Learning Objectives

  • Understand primary-replica replication and read/write splitting
  • Know about replication lag and its impact on consistency
  • Learned about automatic failover for high availability
  • Experienced the performance difference between replicated and non-replicated setups

Experiments

  1. Set readReplicas to 0 on the Primary DB to see the impact of no read scaling

Failure Modes to Trigger

  • Trigger: Set readReplicas to 0 on the Primary DB to see the impact of no read scaling

    Observe: The primary handles all 2000 rps (reads + writes). It becomes the bottleneck, latency increases, and a single failure takes down everything.