Photo by Jonathan Diemel on Unsplash
HAProxy Installation & Configuration for Ubuntu 22.04 Jammy Jellyfish
The world of high availability, load-balancing, and proxying.
HAProxy is an excellent reverse proxy for high-availability, load-balancing, and proxying.
Hereunder are notes and links I personally find useful for working with HAProxy.
Interesting Use-case
I've started using HAProxy again because I needed a way to log HTTP requests sent to our TypeSense server. With HAProxy, we can easily duplicate the HTTP requests sent to our Typesense server, sending a copy of those HTTP requests to our logs server.
Release Cycles & End of Life
- Even releases (2.0, 2.2, 2.4, 2.6) are LTS.
- Odd releases (2.1, 2.3, 2.5) are non-LTS.
- HAProxy End of Life
Installation
To check your Ubuntu version:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.1 LTS
Release: 22.04
Codename: jammy
To install for Ubuntu 22.04 Jammy Jellyfish:
$ sudo apt-get install --no-install-recommends software-properties-common
$ sudo add-apt-repository ppa:vbernat/haproxy-2.6
$ sudo apt-get install haproxy=2.6.\*
Configuration
$ sudo nano /etc/haproxy/haproxy.cfg