Welcome!
This course is a hands-on introduction to load balancing with HAProxy.
You'll start by installing HAProxy on Ubuntu, then step through configuring it for common load balancing scenarios—from simple HTTP routing to raw TCP forwarding. Along the way, you'll learn the core concepts behind load balancing and how HAProxy applies them in practice.
What you'll learn
- How to install and run HAProxy on Ubuntu
- How to configure HAProxy for both HTTP and TCP load balancing
- How to test failure scenarios
- Understand key HAProxy features like frontends, backends, and health checks
Prerequisites
To follow along, you should be:
- Comfortable using the command line
- Familiar with basic Linux concepts
- Able to work with terminal-based text editors (e.g.,
vim,nano, oremacs)
What is HAProxy?
HAProxy is a free, open source, high-performance reverse proxy trusted for its reliability and versatility. It provides load balancing, high availability, and traffic proxying for both TCP and HTTP-based applications, making it a key component in many modern infrastructure stacks.
HAProxy is known for its speed, stability, and rich feature set. It's commonly used to distribute incoming traffic across multiple backend servers, helping systems scale efficiently and stay resilient under load. Whether you're building a web application, managing microservices, or operating a large-scale deployment, HAProxy gives you the control and performance needed to keep services running smoothly.
What is load balancing?
Load balancing is the practice of distributing incoming network traffic across multiple servers. This helps maintain performance, improve responsiveness, and prevent downtime (especially under heavy load or during failures).
A load balancer acts as a reverse proxy, sitting between clients and backend servers, and directs traffic based on factors like server health, current load, or specific routing rules.
In modern systems, load balancing is essential for scalability and reliability. Whether you're running a simple web app or a large-scale distributed system, a load balancer ensures users experience consistent performance and high availability. It also enables fault tolerance: if one server fails, traffic can be seamlessly redirected to healthy instances.
Resources
Here are some HAProxy resources that could prove useful during (and after completing) the course:
- Next lesson
- Installation