1. Clustering mode #
Ensuring high availability and load balancing.
Resilience and Horizontal Scaling #
Available in: ✓ OSS ✓ Enterprise ✓ Cloud Alloy is open source; with Grafana Cloud it ships to managed services and is driven by Fleet Management
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
💬 Recent discussions about this course
- Alloy : recevoir de l'OTLP et l'envoyer vers Tempo et Mimir✓ solved · 1 reply(ies)
Ask a question about this lesson →See all discussions about this course
Course Glossary
Grafana Alloy
An open-source, vendor-neutral telemetry collector designed to replace Grafana Agent, fully compatible with OpenTelemetry (OTel).
Recommended Articles
Fleet Management, Kubernetes Monitoring and the OpenTelemetry engine: Alloy at scale
Manage hundreds of Alloys with remotecfg and Fleet Management, deploy the k8s-monitoring v4 Helm ...
The LGTM stack (Loki, Grafana, Tempo, Mimir): architecture and setup
Grafana Labs' LGTM stack: Loki for logs, Grafana for visualization, Tempo for traces, Mimir for m...
Deploying and operating Pyroscope on Kubernetes
Install Pyroscope with Helm, collect cluster profiles with Alloy (annotations and eBPF), size, se...
Anatomy of HAProxy configuration, clustering and high availability
Understand the structure of an haproxy.cfg file: the global, defaults, frontend (high performance...
HAProxy in Kubernetes: the high-performance Ingress Controller
Discover in depth how HAProxy integrates with Kubernetes: direct-to-pod architecture, hot update ...
Grafana Alloy: The importance of Self-Monitoring
Discover why and how to configure Grafana Alloy so that it monitors itself, collecting its own lo...
k6 and Alloy: sending load test results over OpenTelemetry
Send k6 metrics to Alloy with the OpenTelemetry output, convert them for Mimir and compare them w...
Grafana Alloy: Understanding and exploiting the User Interface (UI)
Discover how to enable, secure, and use Grafana Alloy's built-in web interface to visualize your ...
Grafana Alloy: Introduction and Architecture
Discover the fundamental concepts of Grafana Alloy, the transition from the static Agent to Alloy...