Load balancing กระจายคำขอที่เข้ามาไปยังเซิร์ฟเวอร์หลายเครื่อง — ทำให้เกิด horizontal scaling ปรับปรุง availability และป้องกันไม่ให้เซิร์ฟเวอร์เครื่องใดเครื่องหนึ่งรับภาระมากเกินไป มันเป็นคอมโพเนนต์พื้นฐานของระบบที่สเกลได้และน่าเชื่อถือ
Load balancer ทำอะไร
A LOAD BALANCER sits in front of multiple servers and distributes requests among them:
Client → LOAD BALANCER → ┬→ Server 1
├→ Server 2
└→ Server 3
→ spreads load → no single server is overwhelmed (enables HORIZONTAL scaling)
→ routes around FAILED servers (health checks) → high AVAILABILITY
→ a single entry point for clients
ทำไม load balancing จึงสำคัญ
✓ SCALABILITY → distributes load across many servers → handle more traffic by adding servers
✓ AVAILABILITY → if a server fails, route to healthy ones → no single point of failure
✓ PERFORMANCE → prevents any server from being overloaded → consistent response times
✓ Enables ZERO-DOWNTIME deploys, maintenance (take servers out of rotation)
→ a foundation of scalable, highly-available systems.
