
Discover load balancing with a proxy and automation via ansible in practical setup using vagrant. The introduction outlines course structure, prerequisites, and required tools for configuring the environment.
Discover how a proxy functions as both a reverse proxy and load balancer, distributing client requests across servers, enabling anonymity and SSL offload across platforms like Nginx, AWS, and GCP.
Discover how a proxy load balancer improves performance, availability, and redundancy by evenly distributing traffic, performing health checks, and enabling rapid failover across server clusters.
Bring up a HAProxy environment using a vagrant file to spin up a proxy and two Apache backends, with provisioning scripts to configure the VMs.
Explore haproxy configuration sections, including global, defaults, front end, back end, and listen, and learn how to define listeners, route traffic to back ends, and implement health checks.
Prepare two Apache servers, customize individual messages to distinguish server one from server two, and verify their static home pages via their IP addresses in a Vagrant setup.
Configure HAProxy with a frontend and backend, set the listen IP and port, and use round-robin to balance traffic between two servers.
Learn how default backend and use backend work, how access lists create catch-all rules to forward traffic to web servers, and when to reload versus restart HAProxy.
Explore HAProxy load balancing algorithms, including round-robin (static and dynamic), slow start, and weight-based server pools. Learn IP-based, hash-based, and HTTP header routing for persistent, efficient traffic distribution.
Explore non-default port configurations in a HAProxy load-balanced setup, adjusting front-end and back-end ports, testing with browser requests, and updating backend servers to maintain connectivity.
Configure non-default ports in your HAProxy setup and backend servers to enable flexible load balancing. The lecture explains front-end and back-end port independence, with practical steps and tests.
Check and disable SELinux to prevent traffic blocks on HAProxy. Temporarily use setenforce commands and permanently edit /etc/selinux/config to enable permissive mode.
Learn to configure haproxy in tcp mode, switch from http mode, inspect http packets and headers at the application layer, and adjust defaults while verifying status.
Explore when to use tcp mode versus http mode in HAProxy, with a hands-on demo configuring frontends and backends, port choices, and a round-robin test.
Configure and view the real-time stat page for your HAProxy proxy, enabling front-end and back-end status with optional HTTP authentication using admin admin.
Enable logging in HAProxy to capture every request and response, and forward logs to a log server or write them to local files for troubleshooting and analytics.
Explore advanced HAProxy logging, including front-end and backend logs with local0, sampling, and silent options, plus capturing headers and user agents.
Master acls in HAProxy by using named and anonymous access lists, combining conditions with and/or, and applying sample fetch methods such as path, host, and header.
Master ACL part 2 in HAProxy covers axis list concepts, fetch methods, convertors, and match types. Learn to redirect requests, select backends, and modify HTTP headers for authorization.
Master advanced access lists in HAProxy by using sample fetch methods like hdr and hdr_begin, combining them with match methods, and analyzing headers, payloads, cookies, and regex patterns.
Covers HAProxy ACL part 4, showing where to place access lists (frontend or backend), count headers, and modify HTTP headers with if or unless conditions.
Explore axis list based access control in HAProxy. Learn to set path and query string, rewrite requests, and route to backends based on path, domain, and query parameters.
Set up a new vagrant-based environment using express with node, npm, and MongoDB to practice SSL termination, logging, cookies, and the Yelp Camp app in a load-balancing lab.
Run the app with npm start, connect to MongoDB at the VM IP 10.0.1.20, and explore signups, campground creation, admin privileges, and MongoDB Compass during this lab setup.
Learn to configure a simple HAProxy with two back-end servers, route traffic on port 80, and diagnose data isolation and login issues caused by separate databases.
Fix the db issue by creating a shared MongoDB database and updating servers to connect to it, then verify cross-server sign-up and login work.
Learn how cookies enable persistent sessions in a load-balanced proxy by configuring a cookie name to ensure requests go to the same backend.
Practice acl concepts in lab 1 by replicating example files to configure access lists, path matching, and backends, then test deny and permit rules with a proxy and logs.
Explore HAProxy lab techniques by building multiple examples to demonstrate access lists, blocking http responses, and filtering by user agent and host headers, using Wireshark and real-browser tests.
Learn ACL lab 3 by configuring HAProxy to redirect requests, add headers to requests and responses, apply access lists, and verify with Wireshark and custom log formats.
Explore how HAProxy performs tcp-based and http-based health checks, tune fall and rise thresholds, and manage backends with track, primary, and backup servers.
Configure an HTTP-based health check in HAProxy on a two-server setup, observe round-robin routing, and verify failover when one server becomes unavailable.
Explore how to control HAProxy with its API via the admin socket, dynamically enable or disable backends, adjust weights, health checks, and maintenance or drain modes, including remote operations.
Explore setting up keepalived for high availability of a proxy by creating a secondary edge proxy, configuring a floating IP, and automatic failover between master and backup.
Learn how VRRP with keepalived manages a floating IP between two proxies, electing a master by priority and promoting a slave on failure.
Dive into VRRP with a hands-on exploration of floating and secondary IPs, troubleshooting keepalived and testing failover to demonstrate high availability.
Learn how ssl termination works in a load balancer setup by terminating ssl on the proxy in http mode, or using ssl pass-through in tcp mode, with practical config ideas.
Learn how to configure SSL termination with HAProxy by generating a self-signed certificate with OpenSSL and merging the key and certificate into a single PEM.
Fine-tune SSL by testing redirects from HTTP to HTTPS, configuring port listeners (80 and 443), and exploring certificate details, protocol restrictions, and cipher settings for a secure HAProxy setup.
Set up a Linux certificate authority and sign CSRs to issue certificates for your HAProxy proxy. Learn about wild card certificates, subject alternative names, and OpenSSL for secure load balancing.
Enable SSL between the proxy and backend express apps by generating a private key and CSR, obtaining a CA-signed certificate, and serving HTTPS on port 443.
Learn to manage ssl re-encryption between express and a proxy by handling private keys, passphrases, and certificates, including creating csrs, removing passphrases, and configuring ssl verify in proxy.
Configure HAProxy to use ssl passthrough, forwarding encrypted traffic to backends without terminating ssl, and require ssl on backend servers using tcp rather than http.
In this course, we will learn about Load balancer concepts and its advantages specifically HAProxy.
HAProxy is flexible, fast and reliable open source software which can provide us with reverse proxy and load balancing ability.
We will conceptually talk about different aspects of HAProxy and load balancing.For each topic we will bring up lab environments by Vagrant and practice what we have learned and we verify the results to meet our expectations.Our basic topic includes:
HAProxy installation
HAProxy basic configuration sections
HTTP mode
TCP mode
Non Default ports
We then move to more advanced topics including:
ACL
Logging
SSL termination
HA
Health check and server failure detection
I also added a section on how to automate HAProxy installation and configuration with Ansible at the end of the course(This section is completely optional).
The only prerequisite for this course is basic familiarity of Linux commands, and layers of TCP/IP stack specially TCP protocol and above.
You need a laptop with some tools installed including text editor of your choice,Vagrant,Virtual box.We may also install additional tool during some lectures.
This course is suitable for all system administrator who are willing to learn about load balancer and its applications.Even if you job requires you to work in cloud environment like AWS or Azure, you will gain solid understanding of LB and you could easily adjust your knowledge and apply it in those environments.