Skip to main content

HAProxy Config Validator

Paste your haproxy.cfg and catch configuration errors before deploying. Validates frontend/backend structure, server directives, health checks, SSL settings, and balance algorithms. Runs entirely in your browser — your config never leaves your machine.

✓ Structure validation ✓ Backend cross-reference ✓ SSL & health check hints

Frequently Asked Questions

What is HAProxy?▼

HAProxy (High Availability Proxy) is a free, open-source TCP/HTTP load balancer and proxy server. It's widely used in high-traffic websites including GitHub, Stack Overflow, and Twitter. It provides layer 4 (TCP) and layer 7 (HTTP) load balancing, SSL termination, health checks, and detailed stats.

What is the difference between HAProxy frontend and backend?▼

A frontend defines how HAProxy accepts connections — the bind address/port, ACL rules, and which backend to use. A backend defines the pool of servers to send traffic to, including the load balancing algorithm (roundrobin, leastconn) and health check configuration. A 'listen' block combines both into one section.

What load balancing algorithms does HAProxy support?▼

roundrobin (default, equal distribution), leastconn (send to least-loaded server), source (IP hash, sticky sessions by client IP), static-rr (like roundrobin but static weights), first (fill servers sequentially), uri (hash on URI path, useful for caching), url_param (hash on URL parameter), hdr (hash on HTTP header), and random.

How do HAProxy health checks work?▼

Add 'check' to a server line: 'server web1 127.0.0.1:8080 check'. By default, HAProxy makes a TCP connection. For HTTP health checks, add 'option httpchk GET /health HTTP/1.1' to the backend. Configure check interval with 'inter 2s', failure threshold with 'fall 3', and recovery with 'rise 2'. Failed servers are removed from rotation automatically.

How do I configure SSL termination in HAProxy?▼

In the frontend bind line: 'bind *:443 ssl crt /etc/ssl/certs/example.pem'. HAProxy expects the certificate and private key concatenated into one .pem file: cat fullchain.pem privkey.pem > example.pem. Add 'ssl-min-ver TLSv1.2' and 'ciphers ECDHE-ECDSA-AES256-GCM-SHA384:...'. For HTTP/2 support, add 'alpn h2,http/1.1'.

How do I test my HAProxy config?▼

Run: haproxy -c -f /etc/haproxy/haproxy.cfg. The -c flag checks configuration without starting the service. To reload without dropping connections: haproxy -sf $(cat /var/run/haproxy.pid) -f /etc/haproxy/haproxy.cfg. Or with systemd: systemctl reload haproxy.

Sponsored

Disclosure

Affiliate disclosure: some links below may earn us a small commission at no cost to you. Learn more

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →