Skip to content

haproxy/role

Defines the role of a node in the HAProxy cluster

HAProxy Node Role

This parameter defines whether a node acts as a load balancer or as a backend server in the HAProxy cluster. It is fundamental to service discovery and configuration.

Requirements

  • Must be set on all nodes participating in the HAProxy cluster
  • Role selection affects which other parameters are required

Usage

For load balancer nodes:

YAML
haproxy/role: load-balancer
Additional required parameters: - haproxy/filters: to discover backend nodes - haproxy/frontend/config: recommended for service configuration

For backend nodes:

YAML
haproxy/role: backend
Additional required parameters: - haproxy/backend/services: to define available services - haproxy/backend/services/config: recommended for service configuration

Example in cluster configuration:

YAML
cluster/machines:
  load-balancer:
    pipeline: universal-application-haproxy-server
    names: ['lb01.local.domain']
    Params:
      haproxy/role: load-balancer
  web-backend:
    pipeline: universal-application-apache-web-server
    names: ['web01.local.domain', 'web02.local.domain']
    Params:
      haproxy/role: backend

Objects that Reference haproxy/role

Not used in current content packs

Objects used by haproxy/role

Not used in current content packs