RousselTMLEARNING

Article · Alloy: From Discovery to Expertise

Clustering Mode

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 a StatefulSet rather than a Deployment. 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: 10Gi

📄 Grafana Alloy: Advanced Deployment and Clustering →

My progress

  • ⏱ Estimated time : ≈ 3 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Recent discussions about this course

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...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!