RousselTMLEARNING

Proxy & networking

Visualizing your infrastructure with HAProxy Topology Visualizer

Learn how to use HAProxy Topology Visualizer to turn complex haproxy.cfg files into interactive diagrams and make debugging your architecture easier.

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.

Related articles

Anatomy of HAProxy configuration, clustering and high availability

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

HAProxy in Kubernetes: the high-performance Ingress Controller

Discover in depth how HAProxy integrates with Kubernetes: direct-to-pod architecture, hot update options (DNS…

What's new in HAProxy: OpenTelemetry, native JWT and performance optimizations

Explore HAProxy's latest innovations: native OpenTelemetry support for observability, JWT validation at the e…

Keep learning

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!