Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana-cloud/send-data/alloy/configure/clustering/distribute-prometheus-scrape-load.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana-cloud/send-data/alloy/configure/clustering/distribute-prometheus-scrape-load/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
Distribute Prometheus metrics scrape load
A good predictor for the size of an Alloy deployment is the number of Prometheus targets each Alloy scrapes. Clustering with target auto-distribution allows a fleet of Alloys to work together to dynamically distribute their scrape load, providing high-availability.
Before you begin
- Familiarize yourself with how to configure Alloy installations.
- Configure Prometheus metrics collection.
- Configure clustering.
- Ensure that all of your clustered Alloys have the same configuration file.
Steps
To distribute Prometheus metrics scrape load with clustering:
Add the following block to all
prometheus.scrapecomponents, which should use auto-distribution:Alloyclustering { enabled = true }Restart or reload Alloys for them to use the new configuration.
Validate that auto-distribution is functioning:
Using the Alloy UI on each Alloy, navigate to the details page for one of the
prometheus.scrapecomponents you modified.Compare the Debug Info sections between two different Alloy to ensure that they’re not scraping the same sets of targets.
Was this page helpful?
Related resources from Grafana Labs


