---
title: "Distribute Prometheus metrics scrape load | Grafana Agent documentation"
description: "Learn how to distribute your Prometheus metrics scrape load"
---

# Distribute Prometheus metrics scrape load

A good predictor for the size of an Grafana Agent Flow deployment is the number of Prometheus targets each Grafana Agent scrapes. [Clustering](/docs/agent/v0.43/flow/concepts/clustering/) with target auto-distribution allows a fleet of Grafana Agents to work together to dynamically distribute their scrape load, providing high-availability.

## Before you begin

- Familiarize yourself with how to [configure existing Grafana Agent Flow installations](/docs/agent/v0.43/flow/tasks/configure/).
- [Configure Prometheus metrics collection](/docs/agent/v0.43/flow/tasks/collect-prometheus-metrics/).
- [Configure clustering](/docs/agent/v0.43/flow/tasks/configure-agent-clustering/).
- Ensure that all of your clustered Grafana Agents have the same configuration file.

## Steps

To distribute Prometheus metrics scrape load with clustering:

1. Add the following block to all `prometheus.scrape` components, which should use auto-distribution:
   
   Alloy ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy
   
   ```alloy
   clustering {
     enabled = true
   }
   ```
2. Restart or reload Grafana Agents for them to use the new configuration.
3. Validate that auto-distribution is functioning:
   
   1. Using the Grafana Agent [UI](/docs/agent/v0.43/flow/tasks/debug/#component-detail-page) on each Grafana Agent, navigate to the details page for one of the `prometheus.scrape` components you modified.
   2. Compare the Debug Info sections between two different Grafana Agent to ensure that they’re not scraping the same sets of targets.
