Spreading query load.
WHAT THEY PROVIDE
Additional servers answering read queries.
WHAT THEY DO NOT HELP WITH
Writes, which still go to one place.
WHAT TO ESTABLISH FIRST
Whether reads are actually the constraint.
WHY
Most applications are read-heavy, but not all.
WHAT THE APPLICATION MUST HANDLE
Directing reads and writes to different servers Tolerating slightly stale reads
WHAT BREAKS NAIVELY
Writing a record then immediately reading it from a replica.
WHAT TO DO
Read from the primary within the same request after a write.
WHAT ELSE TO SEND TO REPLICAS
Reporting Exports Anything heavy and tolerant of lag
WHY THAT ALONE IS WORTH IT
It removes the queries most likely to disrupt the live system.
WHAT TO MONITOR
Lag on each replica.
WHAT TO DO WHEN LAG GROWS
Stop sending reads there until it recovers.
WHAT AUTOMATES THAT
A proxy aware of lag.
WHAT TO BE CAREFUL WITH
Replicas falling behind during heavy writes Long queries on a replica delaying its own replication
WHAT TO CONSIDER BEFORE ADDING REPLICAS
Whether indexing and caching would solve it more cheaply.