Load Balancing
Back to Networking
In distributed systems, load balancing aims to optimize resource use
Terminology
-
High Availability Proxy (HAProxy) is a TCP/HTTP Load Balancer and proxying solution. Open source software.
-
Access Control Lists (ACL) are used to test conditions and perform actions based on conditions.
-
Backend is a set of servers that recieves forwarded requests. Contains list of servers and load balancing algorithm.
-
Frontend defines how requests should be forwarded to backends.
HAProxy
High Availability load balancer and proxy server for TCP/HTTP
- High availability describes reliability (using multithreading, multiple instances, failiure detection)
Types of Load Balancing
-
No load balancing, user -> internet -> web server (yourdomain.com) -> Database
-
Layer 4 Load Balancing, user -> internet -> load balancer (yourdomain.com) -> multiple web servers -> database
- works towards High Availability setup
- HAProxy uses health checks to determine if a backup server is available to process request
Other Solutions
- Linux Virtual Server (LVS), simple layer 4 Load Balancer
- Nginx, fast and reliable web server, can be used for proxy or load balancing
- often used in conjunction with HAProxy for caching and compression capabilities
- source
- setup
TODO, what are: