2.1.12

Latest release in branch 2.1
Released 5 years ago (March 18, 2021)

Software HAProxy
Branch 2.1
Status
End of life
End of life March 18, 2021
First official release version 2.1.0
First official release date 6 years ago (November 25, 2019)
Release notes https://www.haproxy.org/download/2.1/src/CHANGELOG
Source code http://git.haproxy.org/?p=haproxy-2.1.git;a=tree;h=refs/tags/v2.1.12
Download https://www.haproxy.org/download/2.1/
HAProxy 2.1 Releases View full list

What Is New in HAProxy 2.1

HAProxy 2.1 introduces significant enhancements in observability, security, and dynamic configuration. This release focuses on making the load balancer more transparent and easier to manage at scale.

Category Key Changes
New Features HTTPS Logging, Dynamic SSL Certificates, Log Forwarding, Prometheus Exporter
Improvements Cache Performance, Stick Table Data Retention, ACL and Sample Fetch Updates
Bug Fixes HTTP/2, SSL/TLS, Connection Management, and Memory Handling
Deprecated None specifically mentioned for this release.

How does HTTPS logging improve troubleshooting?

You can now log directly over HTTPS, which secures your log data in transit. This is a big deal for compliance and prevents sensitive data from being exposed on the wire. It integrates with services like Splunk and Elasticsearch without needing a separate log shipper.

In practice, you configure it with a log line that specifies an HTTPS endpoint. The load balancer handles the TLS connection, making your logging pipeline both simpler and more secure from end to end.

What's the deal with dynamic SSL certificates?

This feature lets you load new SSL certificates on the fly without a reload. You use the Runtime API to add or update certificates, which is perfect for large-scale environments with thousands of domains.

This matters because it eliminates service interruption during certificate rotations. You can automate cert updates from an ACME client like Certbot, making your infrastructure more resilient and easier to maintain.

Can HAProxy forward logs to a remote server?

Yes, the new Log Forwarding feature acts as a built-in syslog client. It can send logs to multiple destinations simultaneously, which is great for redundancy or sending data to different analysis tools.

You define a log forward section in your configuration and then reference it from your frontends and backends. This separates the logging logic from the proxy logic, giving you more flexibility in how you handle observability data.

How is the built-in Prometheus exporter used?

A new stats frontend exposes metrics in the Prometheus format natively. You just point Prometheus to the HAProxy stats URI, and it scrapes the data without needing any exporters or converters.

This simplifies your monitoring stack significantly. You get immediate insight into key metrics like request rates, error codes, and backend health, all formatted correctly for Prometheus.

What performance gains were made with caching?

The HTTP cache now supports conditional requests (If-Modified-Since). This means HAProxy can serve a 304 Not Modified response without hitting the origin server, reducing backend load and improving response times for clients.

It also handles the Vary header more intelligently, creating separate cache entries for different content types. This prevents clients from getting the wrong version of a resource, which is a common headache with caching.

FAQ

Do I need to change my configuration to use HTTPS logging?
Yes, you must update your log directives to point to an https:// URL instead of a traditional syslog address. The configuration syntax changes to support the new protocol.

Can I use the dynamic certificate API with Let's Encrypt?
Absolutely. This is a primary use case. You can hook an ACME client into the Runtime API to automatically deploy new certificates as they are issued, achieving zero-downtime renewals.

What happens if my log forwarding destination is down?
HAProxy can buffer log messages in memory if the remote server becomes unavailable. This prevents log loss during network partitions, but you need to size your buffers appropriately for your expected log volume.

Is the Prometheus exporter enabled by default?
No, you must explicitly configure a frontend with the mode prometheus-exporter option to expose the metrics. It doesn't run automatically without setup.

Were there any breaking changes in the ACL or sample fetch system?
Mostly additive. New sample fetches were added, like ssl_bc_alg_keysize, but existing ones remain unchanged. Always test your configs, but upgrades from 2.0 should be smooth.

Releases In Branch 2.1

Version Release date
2.1.12 5 years ago
(March 18, 2021)
2.1.11 5 years ago
(January 08, 2021)
2.1.10 5 years ago
(November 05, 2020)
2.1.9 5 years ago
(September 30, 2020)
2.1.8 5 years ago
(July 31, 2020)
2.1.7 5 years ago
(June 09, 2020)
2.1.6 5 years ago
(June 08, 2020)
2.1.5 5 years ago
(May 29, 2020)
2.1.4 6 years ago
(April 02, 2020)
2.1.3 6 years ago
(February 12, 2020)
2.1.2 6 years ago
(December 21, 2019)
2.1.1 6 years ago
(December 11, 2019)
2.1.0 6 years ago
(November 25, 2019)
2.1-dev5 6 years ago
(November 15, 2019)
2.1-dev4 6 years ago
(November 03, 2019)
2.1-dev3 6 years ago
(October 25, 2019)
2.1-dev2 6 years ago
(October 01, 2019)
2.1-dev1 6 years ago
(July 16, 2019)
2.1-dev0 6 years ago
(June 16, 2019)