1. Clustering mode #
Ensuring high availability and load balancing.
Resilience and Horizontal Scaling #
In vast environments, a single instance of Alloy is not enough to collect from tens of thousands of targets. Alloy's Clustering mode allows launching multiple instances that communicate with each other (via a Gossip protocol). Together, they form a cluster that intelligently distributes the workload (sharding Prometheus scraping targets or log files). If a cluster node fails, the other nodes immediately take over its load, ensuring highly available telemetry collection without data duplication.
Best Practice: In Kubernetes, always deploy Alloy in Cluster mode as aStatefulSetrather than aDeployment. The StatefulSet guarantees stable network identities, which are essential for proper load balancing (Gossip) between nodes.
Common Mistake: Forgetting to configure persistent storage (PVC) on each cluster node for the WAL. If a pod restarts or is rescheduled, unsent metrics will be permanently lost.
# Helm configuration snippet (values.yaml)
alloy:
clustering:
enabled: true
name: "my-alloy-cluster"
controller:
type: statefulset
replicas: 3
volumeClaimTemplates:
- metadata:
name: alloy-wal
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 10GiMy progress
Sign in to track your progress and take notes. Sign in
Course Glossary
Grafana Alloy
An open-source, vendor-neutral telemetry collector designed to replace Grafana Agent, fully compatible with OpenTelemetry (OTel).
Recommended Articles
Grafana Alloy: Metrics Collection (Prometheus & Ecosystem)
Learn how to configure Grafana Alloy to collect, transform, and forward metrics using the Prometh...
Référence des Composants Grafana Alloy
Un guide de référence complet sur tous les composants disponibles dans Grafana Alloy, organisé pa...
Grafana Alloy vs Grafana Agent vs Promtail : Lequel choisir ?
Découvrez l'évolution des collecteurs de télémétrie de l'écosystème Grafana. Comparatif détaillé ...
Grafana Alloy vs Dynatrace ActiveGate: Which to choose?
Comparison between Grafana Alloy and Dynatrace ActiveGate. Understand the fundamental differences...
Bonnes Pratiques Grafana Alloy : Optimiser sa Collecte de Télémétrie
Découvrez les règles d'or pour configurer Grafana Alloy de manière robuste : modularité, gestion ...
Grafana Alloy : Collecter les métriques système et les logs locaux
Découvrez comment configurer Grafana Alloy pour superviser le serveur sur lequel il s'exécute, av...
Grafana Alloy : Collecte et Transformation de Télémétrie
Apprenez à utiliser Grafana Alloy pour collecter, transformer et acheminer logs, métriques et tra...
Déployer et exploiter Pyroscope sur Kubernetes
Installer Pyroscope avec Helm, collecter les profils du cluster avec Alloy (annotations et eBPF),...
Anatomie de la configuration HAProxy, Clustering et Haute Disponibilité
Comprendre la structure d'un fichier haproxy.cfg : sections global, defaults, frontend (haute per...