- show the high-level Collector topology and load distribution patterns,
- explain which Collector components actually require scaling,
- describe when scaling will help and when it will not,
- outline safe scaling strategies for common workloads (stateless ingestion, Prometheus-style scrapers, and stateful processors).

- identify which component in a pipeline is under pressure,
- choose a scaling pattern appropriate to that component (load balancing, sharding, or consistent routing),
- verify that the backend and network can absorb increased load before increasing Collector replicas.

When planning scale operations, focus on the overloaded signal (logs, metrics, or traces), inspect collector metrics that indicate processor, queue, or exporter pressure, and decide whether to scale the Collector, tune configuration, or scale the backend.
| Component type | Description | Primary scaling strategy | Key signals / considerations |
|---|---|---|---|
| Stateless components | Receivers/processors that forward data without keeping per-entity state (e.g., OTLP ingestion that immediately exports) | Horizontal scaling behind a load balancer | Use load balancing; watch memory, cpu, exporter_queue metrics |
| Scrapers (Prometheus-style) | Components that actively pull metrics from targets | Shard scrape targets across collectors (target allocator) | Avoid duplicate metrics; use per-collector http_sd_config |
| Stateful processors | Processors that keep per-trace or per-entity state (e.g., tail-based sampling) | Consistent routing (trace ID hashing) or pinned routing so all related data reaches same replica | Requires routing that preserves group affinity for correctness |

| Symptom | Typical metric(s) | Recommended action |
|---|---|---|
| Spans dropped by processor / memory pressure | processor_refused_spans, other *_refused_* | Increase Collector CPU/memory or add replicas; tune memory_limiter settings |
| Growing exporter queue / sustained queue utilization ~70% | exporter queue size, queue utilization | Increase queue capacity, adjust timeouts/retry settings, or scale Collector tier |
| Exporter enqueue failures (queues full) | exporter_enqueue_failed_spans | Investigate queue limits and backpressure; scale Collectors or tune queue policies |
| High exporter latency / backend slow to respond | exporter_latency, backend response metrics | Likely backend or network bottleneck — scale or optimize backend, do not only add Collector replicas |

If the network link to your backend is saturated or your backend is unable to ingest more telemetry, adding Collector replicas amplifies failures rather than resolving them. Diagnose and resolve backend or network issues before scaling the Collector tier.
- Stateless receivers and processors (for example, OTLP ingestors that simply forward data) are the easiest to scale horizontally. Place a load balancer in front of multiple identical Collector replicas and scale replicas as demand grows.
- Typical setup: clients -> load balancer -> N stateless Collector replicas -> exporter(s).

- Multiple collectors scraping the same targets will produce duplicate metrics. To avoid this, assign each collector a unique subset of targets (sharding).
- Implement a target allocator or similar orchestration that:
- Discovers scrape endpoints,
- Divides them into non-overlapping sets,
- Generates per-collector service discovery configurations (for example, a dedicated
http_sd_config) so each collector scrapes only its assigned targets.
- After scraping, collectors export metrics (e.g., Prometheus Remote Write) to the backend. Sharding guarantees each metric stream is emitted exactly once.

- Operator updates scrape configuration and hands it to the target allocator.
- Target allocator discovers all scrape endpoints and partitions them into unique sets.
- For each Collector pod, the allocator generates an
http_sd_configso each collector scrapes only its assigned endpoints.

- Stateful processors need complete per-trace context to make correct decisions (for example, in tail-based sampling).
- Ensure all spans for a trace are routed to the same Collector replica. Two common approaches:
- Client-side / load-balancing exporter with consistent hashing on the trace ID so all spans for a trace land on the same replica.
- A front-end router that performs consistent hashing and forwards trace data to the appropriate Collector.
- Consistent hashing preserves trace-to-replica affinity even as replicas scale up or down, allowing stateful operations (like tail-sampling) to function correctly.

- Typical flow: client -> load-balancing exporter -> consistent-hash routing -> Collector replicas -> tail-sampling / stateful processing -> backend.
- With consistent trace ID hashing, every span for a trace is forwarded to the same Collector replica, preserving the required context for stateful processing even when replicas change.

- Identify the overloaded signal (logs, metrics, traces). If your pipelines are separated by signal, scale only the affected pipeline.
- Monitor these Collector metrics closely:
- CPU and memory usage,
processor_refused_*(e.g.,processor_refused_spans),- queue sizes and utilization,
exporter_enqueue_failed_*,exporter_latency.
- If the Collector is dropping data or refusing spans, scale the Collector or increase resource limits and tune the memory_limiter.
- If exporter latency / send failures indicate backend or network issues, fix or scale the backend before increasing Collector replicas.
- For scrapers: shard targets (target allocator) so each Collector scrapes a unique set and avoid duplicates.
- For stateful processors: use consistent hashing or pinned routing so all spans from a trace route to the same replica.

- Start by identifying the overloaded signal and inspect the corresponding Collector metrics.
- Scale stateless Collectors behind a load balancer for straightforward horizontal scaling.
- Shard Prometheus-style scrapers or use a target allocator to avoid duplicate metrics.
- Use consistent hashing (trace ID-based routing) for stateful components (e.g., tail-based sampling) so all spans in a trace arrive at the same replica.
- Never scale Collectors blindly when the backend or network is the root cause — that only amplifies errors.
- OpenTelemetry Collector Concepts
- Prometheus Sharding and Scraping Patterns
- Designing for Observability at Scale (patterns)