Knowledge Base

Welcome to HAProxy’s extensive and ever-expanding knowledge base. Created by a team of experts including HAProxy’s Core Development Team; it covers a wide range of topics to help you achieve maximum potential.

HAProxy and HTTP Strict Transport Security (HSTS)

HAProxy provides an easy and straightforward way to add HTTPS to your website. As a load balancer positioned in front of your web servers, it can handle all of the encryption and decryption duties, offloading those tasks from your upstream servers. That's good because...

Redirect HTTP to HTTPS with HAProxy

Use the HAProxy load balancer to redirect users from HTTP to HTTPS automatically. For decades, our lives have become increasingly dependent on sending and receiving data from across the Internet. Now, with more people working, studying, and hanging with friends...

Load Balancing/Routing

Layer 4 and Layer 7 Proxy Mode

HAProxy can run in two different modes: TCP or HTTP. When operating in TCP mode, we say that it acts as a layer 4 proxy. In HTTP mode, we say that it acts as a layer 7 proxy. To understand the difference, you must first learn about the Open Systems Interconnection...

HAProxy Enterprise Offers SAML-based Single Sign-on

HAProxy Enterprise handles SAML single sign-on for your applications and integrates with identity providers like Azure Active Directory. Single sign-on (SSO) is such a familiar convenience for companies that it's easy to forget how powerful it is. When employees...

Use HAProxy Response Policies to Stop Threats

HAProxy gives you an arsenal of sophisticated countermeasures including deny, tarpit, silent drop, reject, and shadowban to stop malicious users. There are two phases to stopping malicious users from abusing your website and online applications. Step one is detection,...

Announcing HAProxy Data Plane API 2.1

Version 2.1 of the HAProxy Data Plane API expands support to all available request and response actions, adds Lua actions, and improves file handling. A year ago, we introduced version 1.0 of the HAProxy Data Plane API, enabling you to configure your HAProxy load...

SSL

Redirect HTTP to HTTPS with HAProxy

Use the HAProxy load balancer to redirect users from HTTP to HTTPS automatically. For decades, our lives have become increasingly dependent on sending and receiving data from across the Internet. Now, with more people working, studying, and hanging with friends...

Dynamic SSL Certificate Storage in HAProxy

Use the HAProxy Runtime API to update SSL certificates in HAProxy without a reload. When you route traffic through an HAProxy load balancer, you gain the ability to terminate SSL at the load balancer. HAProxy encrypts communication between the client and itself and...

Microservices

Accelerate Your APIs by Using the HAProxy Cache

HAProxy's cache helps boost API performance by serving saved messages to your users. The age of rendering most of a web page's contents on the server and then delivering it as a colossal HTML file is fading into the past. Modern web frameworks like Angular, React, and...

Dissecting the HAProxy Kubernetes Ingress Controller

The new HAProxy Kubernetes Ingress Controller provides a high-performance ingress for your Kubernetes-hosted applications. Register for the on demand webinar "The HAProxy Kubernetes Ingress Controller for High-Performance Ingress". Want to supercharge your ingress...

DNS for Service Discovery in HAProxy

HAProxy 1.8 and newer allows you to use DNS service discovery to detect server changes and automatically apply them to your configuration. HAProxy is a mature, high-performance software component that’s been reliably serving the load balancing and ADC markets for over...

Performance

Accelerate Your APIs by Using the HAProxy Cache

HAProxy's cache helps boost API performance by serving saved messages to your users. The age of rendering most of a web page's contents on the server and then delivering it as a colossal HTML file is fading into the past. Modern web frameworks like Angular, React, and...

Test Driving “Power of Two Random Choices” Load Balancing

The Power of Two Random Choices load-balancing algorithm has piqued some curiosity. In this blog post, we see how it stacks up against other modern-day algorithms available in HAProxy. Recently, I was asked twice about my opinion on supporting an algorithm known as...

HAProxy 1.9.2 Adds gRPC Support

HAProxy provides end-to-end proxying of HTTP/2 traffic. Use HAProxy to route, secure, and observe gRPC traffic over HTTP/2. Read on to learn more. HAProxy 1.9 introduced the Native HTTP Representation (HTX). Not only does this allow you to use HTTP/2 end-to-end, it...

Multithreading in HAProxy

There are two possible ways to have HAProxy run on multiple CPU cores: By using the multiprocess model, where HAProxy automatically starts a number of separate system processes (method available since HAProxy version 1.1.7) By using the multithreading model, where...

Webinars

[Live Webinar] HAProxy 2.3 Feature Roundup

The webinar will be held on Tuesday, December 15th, 2020 at following times: US times: 12 noon EST, 11 AM CDT, 10 AM MDT, 9 AM PDT EU times: 5 PM GMT, 6 PM CET HAProxy celebrates the release of version 2.3! As a technical release, this version of HAProxy optimizes...

[On-Demand Webinar] Ask Me Anything About HAProxy 2.2

If you missed the webinar about HAProxy 2.2, you can watch it on-demand. HAProxy 2.2 adds many exciting features, including: fully dynamic SSL certificate storage; a native response generator; advanced ring buffer logging with Syslog over TCP; security hardening;...

Basics

[Live Webinar] HAProxy 2.3 Feature Roundup

The webinar will be held on Tuesday, December 15th, 2020 at following times: US times: 12 noon EST, 11 AM CDT, 10 AM MDT, 9 AM PDT EU times: 5 PM GMT, 6 PM CET HAProxy celebrates the release of version 2.3! As a technical release, this version of HAProxy optimizes...

HAProxy Log Sampling

Log Sampling is a powerful feature introduced in HAProxy 2.0 that lets you define a percentage of your logs to create a representative view of your data allowing you to minimize your costs. Log files are the key to observability. They can provide helpful information...

Layer 4 and Layer 7 Proxy Mode

HAProxy can run in two different modes: TCP or HTTP. When operating in TCP mode, we say that it acts as a layer 4 proxy. In HTTP mode, we say that it acts as a layer 7 proxy. To understand the difference, you must first learn about the Open Systems Interconnection...

Serve Dynamic Custom Error Pages with HAProxy

Set up custom error pages in HAProxy to ensure consistent, branded messaging that supports any backend web stack. The memory is probably still fresh: You're shopping online at your favorite website, looking for something specific, you've got it narrowed down to two or...

Benchmarking

Test Driving “Power of Two Random Choices” Load Balancing

The Power of Two Random Choices load-balancing algorithm has piqued some curiosity. In this blog post, we see how it stacks up against other modern-day algorithms available in HAProxy. Recently, I was asked twice about my opinion on supporting an algorithm known as...

Benchmarking SSL Performance

Introduction The story Recently, there has been some attacks against website which aimed to steal user identity. In order to protect their users, major website owners had to find a solution. Unfortunately, we know that sometimes, improving security means downgrading...

Random Tips

Serve Dynamic Custom Error Pages with HAProxy

Set up custom error pages in HAProxy to ensure consistent, branded messaging that supports any backend web stack. The memory is probably still fresh: You're shopping online at your favorite website, looking for something specific, you've got it narrowed down to two or...

HAProxy and HTTP Errors 408 in Chrome

Lately, there was some discussions on HAProxy's mailing list about 408 errors printed in Chrome browsers. Origin of 408 errors 408 is the status code used by web servers or proxies when the client has not sent a whole HTTP request during a certain period of time. It...

Configure syslog-ng to Log Readable HTTP URL from HAProxy

This tips is provided by Exosec. Exosec provides a very good monitoring product called POM, based on Nagios with very strong value added such as very simple administration, application monitoring, etc... For some of their project, they use either HAProxy or the ALOHA...

Observability

HAProxy Log Sampling

Log Sampling is a powerful feature introduced in HAProxy 2.0 that lets you define a percentage of your logs to create a representative view of your data allowing you to minimize your costs. Log files are the key to observability. They can provide helpful information...

Tracing Requests Through HAProxy with AWS X-Ray

HAProxy integrates with AWS X-Ray to give you the best observability across your Amazon Web Services (AWS) resources, including your load balancer. Read on to learn how. There is a trend to move away from monolithic applications towards microservices. Microservices...

HAProxy Exposes a Prometheus Metrics Endpoint

HAProxy has added native support for Prometheus, allowing you to export metrics directly. Read on to learn more.   Metrics are a key aspect of observability, along with logging and tracing. They contain the data that inform you about the state of your systems,...

Binary Health Check with HAProxy 1.5: PHP-fpm/fastcgi Probe Example

Application layer health checking Health checking is the ability to probe a server to ensure the service is up and running. This is one of the root feature of any load-balancer. One can probe servers and services at different layer of the OSI model: * ARP check (not...

DevOps

[On-Demand Webinar] Learn the HAProxy Data Plane API 2.0

People know HAProxy as the high-performance software load balancer that they can configure once, then trust to do the job, but it's also the best choice for dynamic environments where change is constant. For instance, HAProxy's configuration can be generated on the...

Announcing HAProxy Data Plane API 2.0

Find out more by registering for our webinar: “Learn the HAProxy Data Plane API 2.0“ Version 2.0 of the HAProxy Data Plane API brings some exciting enhancements that unlock the power of HAProxy's flexible configuration and its runtime capabilities. The HAProxy Data...

Programmatic HAProxy Configuration Using the Data Plane API

In his HAProxyConf 2019 presentation, Chad Lavoie (Director of Support, HAProxy Technologies) describes how to get started and how to build tools that integrate with the API. He demonstrates how to configure a frontend and backend in HAProxy, and then how to modify a...

Kubernetes

Service Discovery

HAProxy on Docker Swarm: Load Balancing and DNS Service Discovery

Use HAProxy to add routing, load balancing, and DNS service discovery to Docker Swarm. Docker Swarm lets you expand beyond hosting Docker containers on a single machine. It oversees a cluster of servers and manages which to deploy a container to, depending on each...

DNS for Service Discovery in HAProxy

HAProxy 1.8 and newer allows you to use DNS service discovery to detect server changes and automatically apply them to your configuration. HAProxy is a mature, high-performance software component that’s been reliably serving the load balancing and ADC markets for over...

HAProxy and Consul with DNS for Service Discovery

In this blog post we will show you a zero-touch method for integrating HAProxy with Consul by using DNS for service discovery available in HAProxy 1.8. HAProxy is the most widely used software load balancer in the world, well known for being extremely fast and...

Cloud

HAProxy Enterprise Offers SAML-based Single Sign-on

HAProxy Enterprise handles SAML single sign-on for your applications and integrates with identity providers like Azure Active Directory. Single sign-on (SSO) is such a familiar convenience for companies that it's easy to forget how powerful it is. When employees...

Building Blocks of a Modern Proxy

A major outcome of IT/Ops evolution is realizing the importance of a reverse proxy, such as HAProxy, in achieving modern application delivery. This is the first post in a series about HAProxy's role in building a modern systems architecture that relies on cloud-native...

Tracing Requests Through HAProxy with AWS X-Ray

HAProxy integrates with AWS X-Ray to give you the best observability across your Amazon Web Services (AWS) resources, including your load balancer. Read on to learn how. There is a trend to move away from monolithic applications towards microservices. Microservices...

LUA

Enabling CORS in HAProxy

The HAProxy Cross-Origin Resource Sharing (CORS) Lua module streamlines adding CORS to your APIs. What is CORS? Read on to learn more. It doesn't matter whether you're using Angular, React, Vue or simple, vanilla JavaScript. You're guaranteed to need to fetch or...

5 Ways to Extend HAProxy with Lua

Use Lua to add fetches, converters, actions, services and tasks to HAProxy. Did you know that HAProxy embeds the Lua scripting language, which you can use to add new functionality? HAProxy features an extremely powerful and flexible configuration language and gives...

Let’s Encrypt (ACMEv2) for HAProxy

HAProxy Technologies is proud to announce the availability of an integrated Let’s Encrypt ACMEv2 Lua client for HAProxy and HAProxy Enterprise (HAPEE). HAProxy Enterprise comes bundled with Lua support in a precompiled binary conveniently distributed using your Linux...

HAProxy 1.6-Dev1 and LUA

HAProxy 1.6-dev1 Yesterday, Willy has released HAProxy 1.6-dev1: ANNOUNCE HAProxy 1.6-dev1. This version contains many new features and core improvements. Amongst the new features, one is LUA, contributed by Thierry (HAProxy Technologies developer). NOTE: We invite...

Need More Assistance?

Contact the authoritative experts on HAProxy who will assist you in finding the solution that best fits your needs for deployment, scale, and security.