high availability (HA) หมายถึงการรักษาให้ฐานข้อมูลพร้อมใช้งานแม้เมื่อเกิดความล้มเหลว ผ่าน replication (standby replica), automatic failover (การ promote replica เมื่อ primary ล้มเหลว) และสถาปัตยกรรมที่เหมาะสม เป้าหมาย: ลด downtime และการสูญเสียข้อมูลให้น้อยที่สุด เนื่องจากการล่มของฐานข้อมูลทำให้ทั้งแอปพลิเคชันล่ม
รากฐาน: replication + automatic failover
Primary ──(streaming replication)──▶ Standby replica(s)
If the PRIMARY fails:
→ a STANDBY is automatically PROMOTED to become the new primary (FAILOVER)
→ the application reconnects to the new primary → minimal downtime
→ Without HA, a primary failure = total database outage = application down.
