⚖️ HAProxy Config Generator

Visual HAProxy config builder: load balancing, reverse proxy, SSL termination, health checks

Zero Dependencies · Works Offline

📋 HAProxy Configuration

Global Settings

Frontend Config

Backend Config

What Can the HAProxy Config Generator Do?

The HAProxy Config Generator is a free online tool that helps you quickly produce a working HAProxy configuration through a visual interface. It supports frontend/backend setup, multiple load balancing algorithms, SSL termination, health checks, and common session-persistence features. No HAProxy knowledge is required — just fill in the parameters and a valid config is generated locally in your browser.

Core Features

How to Use

1. Configure Global Settings: listen port, SSL options.

2. Set the Frontend Name and Bind Address.

3. Configure the backend: name, balance algorithm, and server list.

4. Enable Health Check and set the check interval.

5. Click "Generate Config", then copy or download haproxy.cfg.

Use Cases

Case 1: Web App Load Balancing

DevOps engineers use HAProxy to distribute traffic across multiple web servers for high availability and horizontal scaling.

Case 2: Database Read Load Balancing

Balance read requests across MySQL/PostgreSQL replicas using HAProxy's leastconn algorithm.

Case 3: Microservice Gateway

HAProxy serves as the TCP/HTTP entry gateway in microservice architectures, routing to service instances.

Technical Background

HAProxy (High Availability Proxy) is a C-based high-performance load balancer supporting Layer 4 (TCP) and Layer 7 (HTTP) proxying. Key sections: frontend (accepts client requests), backend (forwards to backend servers), and listen (frontend + backend merged). Performance: a single instance can handle a very large number of concurrent connections. Best practices: enable the stats page for monitoring, use stick tables for session persistence, configure graceful shutdown for zero-downtime deploys, and use health checks to prevent cascading failures.

❓ FAQ

What is HAProxy?

HAProxy is a high-performance open-source load balancer and reverse proxy supporting TCP and HTTP applications, widely used in high-availability architectures.

Can I use the generated config directly?

Yes. The generated config follows HAProxy syntax. Save as haproxy.cfg and run haproxy -f. Test in staging first.

Which load balancing algorithms are supported?

Supports roundrobin, leastconn, source (source IP hash), uri (URI hash) and other common algorithms.

Is my data safe?

Absolutely safe. All configuration is generated locally in your browser. No data is uploaded.

How does HAProxy differ from Nginx for load balancing?

HAProxy focuses on load balancing and proxying with extreme performance; Nginx combines web server and load balancer. HAProxy is superior for pure load balancing.

How to configure health checks?

Add check parameter to server in backend. HAProxy periodically checks backend availability. Supports HTTP/TCP check methods.

How to implement session persistence?

Use balance source algorithm (source IP hash), or configure stick table with cookie-based session affinity.