RousselTMLEARNING

Article · HAProxy: from discovery to expertise

Visualizing your infrastructure: Topology Visualizer

1. What is HAProxy Topology Visualizer? #

An essential tool to understand your load balancer's routing logic.

The concept #

How HAProxy Topology Visualizer works

HAProxy Topology Visualizer is a product developed and maintained by RousselTM that analyzes your haproxy.cfg configuration files to generate a graphical representation. It lets you instantly see the relationships between frontends, backends, ACL rules and the final servers.

Why use it? #

  • Configuration audit: identify orphan backends or routing errors.
  • Documentation: generate up-to-date architecture diagrams for your teams.
  • Onboarding: help new team members understand the traffic flow without reading thousands of lines of code.

2. How to deploy the tool? #

Deployment uses Docker Compose from the course's official repository.

Prerequisites #

  • Docker installed on your machine.
  • Sufficient rights to deploy a container.
  • The haproxy_net network must exist. If it doesn't, create it manually:
    docker network create haproxy_net

Deployment procedure #

Run the following commands in your terminal:

# 1. Cloner le repo
git clone https://github.com/rousseltm/haproxy-formation.git

# 2. Accéder au dossier
cd haproxy-formation

# 3. Lancer le déploiement
docker compose -f compose-parser.yaml up -d

Accessing the interface #

Once the container has started, there are two ways to access the tool:

  • Option 1: routing through HAProxy (recommended)
    Use your HAProxy instance (e.g. port 8404) to route traffic to the parser service. To avoid conflicts with the statistics interface, make sure the stats URI is specific (e.g. /stats) and use the use_backend directive:
    # Dans votre section listen ou frontend
    stats uri /stats
    use_backend parser_backend if { path_beg /parser }
    
    backend parser_backend
        http-request set-path %[path,regsub(^/parser,/)]
        server visualizer_srv parser:80 check
  • Option 2: exposing a port directly
    Edit the compose-parser.yaml file to expose the container's port 80 on a port of your machine (e.g. 8555):
    services:
      parser:
        ports:
          - "8555:80"

3. How to use it? #

Three simple steps to visualize your topology.

Importing the configuration #

In the web interface, simply select the folder containing your HAProxy configuration files. The tool analyzes all the files to rebuild the complete topology. If you want to correlate the view with the real state of your node, you can also enter the statistics access details (URL, user and password).

Analyzing the graph #

The tool generates a directed diagram:

  • Frontend nodes: entry points with their listening ports (bind).
  • Edges (lines): represent routing decisions (ACL, use_backend).
  • Backend nodes: server groups with their balancing algorithms.

Filtering and interaction #

Most versions let you click a component to highlight its specific path, which is extremely useful to isolate the flow of a particular application in a shared cluster.

4. Limits and best practices #

What you need to know before using it in production.

Data security #

WARNING: Never upload your configuration to public online versions if it contains secrets, passwords or sensitive IP addresses. Always use a local or containerized instance.

HAProxy versions #

The tool generally supports standard directives up to version 3.x. Some very recent or Enterprise-specific directives may not be rendered graphically, but most of the topology will remain valid.

📄 Visualizing your infrastructure with HAProxy Topology Visualizer →

My progress

  • ⏱ Estimated time : ≈ 7 min

Sign in to track your progress and take notes. Sign in

💬 Questions about this lesson

No questions yet: be the first to ask for help or share your configuration.

Ask a question about this lesson →

Recommended Articles

Load balancing: principles, algorithms and use cases

Discover how load balancing works, its role in high availability, and the details of algorithms s...

Monitoring and statistics in HAProxy

How to enable the native statistics dashboard and expose metrics for Prometheus.

HAProxy in Kubernetes: the high-performance Ingress Controller

Discover in depth how HAProxy integrates with Kubernetes: direct-to-pod architecture, hot update ...

HAProxy as a Kubernetes Ingress Controller: the production guide

Learn how to use HAProxy as an Ingress Controller in Kubernetes: direct-to-pod architecture, TLS ...

HAProxy best practices: optimization, security and high availability

Discover the best practices for configuring HAProxy to ensure the performance, security and resil...

Mastering ACLs in HAProxy: the complete guide

A complete guide to HAProxy ACLs: learn how to configure smart routing, IP-based access control, ...

HAProxy: a detailed guide to configuration directives

A complete exploration of HAProxy's essential directives: from bind to http-check, learn how to c...

Mastering ACLs in HAProxy

A complete guide to HAProxy ACLs: learn how to configure smart routing, IP-based access control, ...

Anatomy of HAProxy configuration, clustering and high availability

Understand the structure of an haproxy.cfg file: the global, defaults, frontend (high performance...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!