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/observe-and-act/send-data/alloy/configure/clustering.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana-cloud/observe-and-act/send-data/alloy/configure/clustering/. 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.
Configure clustering
You can configure Alloy to run with clustering so that individual Alloy instances can work together for workload distribution and high availability.
To configure clustering, complete these two steps:
- Enable clustering in Alloy: Configure Alloy itself to join a cluster using Helm chart settings or command-line flags.
- Enable clustering in components: Add a
clusteringblock to each component that should participate in workload distribution.
Note
Cluster mode at the Alloy level doesn’t automatically distribute workload. You must also enable clustering in each component that should participate in the cluster. Only components with a configured
clusteringblock distribute workload.
Enable clustering in components
Several components support workload distribution through clustering, including prometheus.scrape, loki.source.kubernetes, and pyroscope.scrape.
Refer to Distribute workload across cluster nodes for the complete list.
To enable clustering in a component, add a clustering block with enabled = true:
prometheus.scrape "example" {
targets = discovery.kubernetes.pods.targets
forward_to = [prometheus.remote_write.default.receiver]
clustering {
enabled = true
}
}Next steps
- Configure Alloy for clustering: Enable clustering in your Alloy installation.
- Distribute workload across cluster nodes: Configure components to distribute workload.
Was this page helpful?
Related resources from Grafana Labs


