Safety buddy system for disaster recovery
Synchronous = Both must confirm before moving on
Think of it like a safety buddy system where both databases must save the data before confirming success.
User saves a post "Hello World"
1. Main Database receives write request
↓
2. Main Database: "Wait! Let me tell my standby buddy first"
↓
3. Main Database sends data to Standby Database
↓
4. Standby Database saves it: "I got it!"
↓
5. ONLY NOW Main Database tells user: "Your post is saved!"
Because Multi-AZ is for DISASTER RECOVERY
If the main database crashes right after saving data, the standby MUST already have that data.
Main DB: Saves "Hello World"Main DB: Crashes! (before sending to standby)
Standby DB: Becomes new main (doesn't have "Hello World")
Data LOST!
Main DB: Saves "Hello World"
Standby DB: Also saves "Hello World"
Main DB: Crashes!
Standby DB: Becomes new main (HAS "Hello World")
Data SAFE!