Cobra Forum

Other Discussion and Support => Tutorials => Topic started by: mahesh on Dec 01, 2023, 05:07 AM

Title: How to Load Balance Apache Web Server on Ubuntu Server 18.04 LTS
Post by: mahesh on Dec 01, 2023, 05:07 AM
Greetings and salutations,

I hope this thread will be helpful to those who follow in my foot steps as well as getting any advice based on what I have done / documented.

Link to original post: HammondsLegacy Forums (best when viewed at original location due to custom formatting)

High-level overview

HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. It is particularly suited for very high traffic web sites and powers quite a number of the world's most visited ones

This tutorial will cover how to setup a redundant HAProxy system which will direct traffic to redundant web servers. This will provide high availability when server goes offline...for such things as maintenance tasks.

The proxy servers will route both secured and unsecured web traffic to the web servers and let the web servers determine how they are going to handle SSL rules and certificates. This will make issuing and renewing certificates much less complicated than handling them at the proxy level.

This is an overview image of a highly-available web server platform.
This article covers the web load balancers.


Tools utilized in this process



Helpful links

The list below are sources of information that was helpful in the creation of this document.


Assumptions

This documentation will need to make use of some very-specific information that will most-likely be different for each person / location. And as such, this information will be noted in this section. They will be highlighted in red throughout the document as a reminder that you should plug-in your own value rather than actually using these "place-holder" values.

Under no circumstance should you use the actual values listed below. They are place-holders for the real thing. This is just a checklist template you need to have answered before you start the install process.

Wherever you see RED in this document, you need to substitute it for you will use in your environment.


Load Balancer Servers - Setup two Ubuntu servers for use as the HAProxy servers. This tutorial assumes the server was configured according to this tutorial: How to install and configure Ubuntu Server

Web Servers - Setup three Ubuntu servers for use as the web servers. This tutorial assumes the server was configured according to this tutorial: How to Install Apache Web Server on Ubuntu Server 18.04 LTS

It is also assumed the reader knows how to use the VI editor. If not, you will need to beef up your skill set or use a different editor in place of it.