---
isPrivate: true
title: HAProxy in multi-process mode
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > Integrations > FAQ Integrations > HAProxy in multi-process mode
---

# HAProxy in multi-process mode

When using the HAProxy in multi process mode, each process has its own memory area and therefore has its own statistics.

{% image
   source="https://datadog-docs.imgix.net/images/integrations/faq/haproxy_config_multi_process.1ebf2da61a764b3a592148c36ff89539.png?auto=format"
   alt="HAProxy config multi process" /%}

This implies that each process needs to have a dedicated socket or endpoint for giving access to its statistics.Accordingly, in the Datadog configuration file for HAProxy, **each socket or endpoint has to be declared as an instance**.

{% image
   source="https://datadog-docs.imgix.net/images/integrations/faq/haproxy_multi_process_agent_conf.1239afe83a78e630d2be57879f9d9f7d.png?auto=format"
   alt="HAProxy multiprocess configuration" /%}

Otherwise they share the same `/haproxy_stats` endpoint, and getting the HAProxy statistics from it shows the stats only for the process assigned to the current request.

{% image
   source="https://datadog-docs.imgix.net/images/integrations/faq/haproxy_stats_1.ba5fa4005158917523ab1af98d8f393c.png?auto=format"
   alt="HAProxy stats 1" /%}

Refreshing the page in your browser shows the stats from a different process than previously:

{% image
   source="https://datadog-docs.imgix.net/images/integrations/faq/haproxy_stats_2.50656574088a2a0bfb278f1ee11b22fe.png?auto=format"
   alt=" HAProxy stats 2" /%}

If your HAproxy integration is not well configured, you may notice:

- Missing points on HAProxy metrics that are reported as rate [can be checked here](https://github.com/DataDog/integrations-core/blob/master/haproxy/datadog_checks/haproxy/legacy/haproxy.py) and for which you should get a value each 20 seconds.
- High values and high variations on metrics that are low in normal conditions such as 5xx code error responses.
