Skip to content

haproxy/backend/services

Configuration options for HAProxy backend services

HAProxy Backend Services

This parameter defines which services are available on backend nodes and their corresponding ports. It is used during service discovery to create the HAProxy configuration.

Requirements

  • Must be defined on backend nodes (haproxy/role = backend)
  • Port numbers must be valid (1-65535)
  • Service names should be descriptive and match frontend configurations

Usage

Define available services on a backend node:

haproxy/backend/services:
  http: 80
  https: 443
  postgres: 5432

For services that listen on multiple ports:

haproxy/backend/services:
  http: 80
  https: [443, 8443]
  metrics: 9090

Example in a cluster configuration:

cluster/machines:
  web-backend:
    pipeline: universal-application-apache-web-server
    names: ['web01.local.domain', 'web02.local.domain']
    Params:
      haproxy/role: backend
      haproxy/backend/services:
        http: 80
        https: 443