Multi-Backend Fan-Out Architecture in OpenTelemetry

Multi-Backend Fan-Out Architecture in OpenTelemetry

Learn how one stream of traces, metrics and logs can be copied to many destinations at once, how the OpenTelemetry Collector makes that safe and cheap, and which design choices keep the whole thing reliable in production.

Imagine a school principal who writes one important announcement every morning. The teachers need a copy, the parents need a copy, the school newspaper wants a copy, and the government office needs a copy for its records. The principal could write the same note four times by hand, but that would be tiring and error-prone. A smarter school hires one office assistant who receives the original, makes the right copies, and hands each one to the right person, even if the newspaper changes its address next month.

A multi-backend fan-out architecture in OpenTelemetry is that office assistant for your telemetry. Your applications produce one stream of information about what they are doing, and a central component copies it to several different destinations, called backends. This post walks through the idea from the ground up, explains every new term the first time it appears, and then goes deep into how it works, where it can break, and how experienced teams design it.

1The Problem: One Signal, Many Destinations

Before we learn the solution, we need to feel the pain it removes.

Modern software is rarely one program running on one computer. A single online shopping order might touch a website, a payment service, a stock service, a shipping service and a database. When something goes wrong, engineers need evidence about what each piece was doing. That evidence is called telemetry, which simply means data that software sends out about its own behavior so that humans can understand it later.

Telemetry is useful only if it lands somewhere people can look at it. The place where it lands is called a backend. A backend might be a tool that draws graphs, a search engine for logs, a long-term storage bucket, or a security system that hunts for suspicious activity. The trouble is that real organizations almost never use just one backend.

Simple Analogy

Think of a hospital. The same patient reading, such as a heart rate, is shown on the nurse’s screen, saved in the permanent medical record, checked by an alarm system, and sent to a research database. Nobody wants the nurse to type the number into four different machines. One reading should be captured once and shared with everyone who needs it.

Why teams end up with several backends

Different teams have different needs. The platform team may love one tool for graphs, the security team may require another for investigating attacks, and the finance team may only care about a cheap archive that satisfies an audit rule. Companies also merge, and each side arrives with its own tools. Nobody gets to choose a single winner without a long fight.

There is also the matter of change. Contracts end, prices rise, and better tools appear. If every application is hard-wired to talk to one specific vendor, then changing vendors means editing and redeploying hundreds of services. That is slow, risky, and exactly the kind of work engineers dread.

1
stream produced by the application
N
destinations that all want a copy
0
application changes needed to add another

Fan-out is the answer to this mess. The word comes from electronics and software, where it describes one output feeding many inputs. Picture the ribs of a hand fan opening from a single point. In telemetry, the single point is where data is collected, and the ribs are the many backends that receive it.

2A Quick Map of OpenTelemetry

Fan-out only makes sense once you know the pieces it connects.

OpenTelemetry, often shortened to OTel, is an open standard and a family of tools for producing and moving telemetry. It is vendor neutral, which means it does not belong to any single monitoring company. It was created so that applications could describe their behavior in one common language, and then send that description anywhere.

The three main kinds of signal

OpenTelemetry calls each type of telemetry a signal. Understanding the three main ones is important because fan-out treats each of them separately.

Signal 1

Traces

The story of one request as it travels through many services. Each step is a span with a start time, an end time and some labels.

Signal 2

Metrics

Numbers measured over time, such as requests per second, memory in use, or errors per minute. They are small and cheap to store.

Signal 3

Logs

Text records of things that happened, such as a user signing in or a payment failing. They are detailed but can be huge in volume.

Common Glue

Resource and Attributes

Labels attached to data, such as the service name, the server it ran on, or the region. Many fan-out decisions are made by reading these labels.

The two big building blocks

OpenTelemetry has two pieces that matter for this post. The first is the SDK, a software development kit, which is a library living inside your application. It creates the telemetry and hands it off. The second is the Collector, a separate program that receives telemetry, processes it, and forwards it. Fan-out is mostly a Collector story, although the SDK can do a limited version of it.

Applications talk to the Collector using a shared protocol called OTLP, the OpenTelemetry Protocol. Because everybody speaks OTLP, an application does not need to know what lies behind the Collector. It sends data to one friendly address and trusts the Collector to take care of the rest.

flowchart LR
  A["Application with OTel SDK"] -->|"OTLP"| C["OpenTelemetry Collector"]
  C --> B1["Backend 1"]
  C --> B2["Backend 2"]
  C --> B3["Backend 3"]
        
FIG 1 — The simplest picture of fan-out: one source, one Collector, many backends

Notice how the application only knows about the Collector. That single design choice is what buys you freedom. Adding a fourth backend becomes a change to the Collector, not to every application.

3Inside the Collector: Five Parts You Must Know

The Collector is built from small, replaceable parts that you snap together.

If you understand five words, you understand the Collector. Think of it as a factory assembly line. Raw material comes in at one end, gets cleaned and shaped in the middle, and leaves in boxes at the other end.

Part 1

Receiver

The front door. It accepts incoming data, for example OTLP from applications, and turns it into the Collector’s internal format.

Part 2

Processor

A worker on the assembly line. It can filter, rename, add labels, hide sensitive values, group data into batches, or protect memory.

Part 3

Exporter

The shipping dock. It sends data out to one specific backend and handles the details of that backend’s protocol and login.

Part 4

Connector

A special part that acts as an exporter for one pipeline and a receiver for another, letting data hop between pipelines inside the Collector.

Part 5

Pipeline

The whole assembly line for one signal type: a list of receivers, an ordered list of processors, and a list of exporters.

Helper

Extension

Support equipment that is not on the line itself, such as health checks, authentication helpers, and disk storage for queues.

Simple Analogy

A pipeline is like a mail sorting room. Receivers are the mail slots where letters arrive. Processors are the clerks who check addresses, stamp envelopes and remove anything forbidden. Exporters are the delivery trucks, each going to a different neighborhood.

Where fan-out and fan-in naturally appear

A pipeline is allowed to have more than one receiver and more than one exporter. When several receivers feed one pipeline, their data is merged together, which is called fan-in. When one pipeline has several exporters, every item is copied to each of them, which is fan-out. You do not need a special feature to get fan-out. It is simply what happens when you list more than one exporter.

That is why the Collector is such a natural home for this architecture. The concept is built into its shape. What takes skill is not turning fan-out on, but designing it so that one slow or broken backend does not hurt the others.

i
Good to Know

Pipelines are defined per signal. A traces pipeline, a metrics pipeline and a logs pipeline are three separate assembly lines, and each can have its own list of backends. You might send traces to two tools but logs to three.

4What Multi-Backend Fan-Out Really Means

A precise definition, plus the three promises a good design makes.

A multi-backend fan-out architecture is a design in which telemetry produced once is delivered to two or more independent backends, with the copying and routing handled by a shared layer rather than by each application. The word independent matters. Each backend should be able to slow down, change, fail or be replaced without forcing a change in the producers and without damaging delivery to the others.

“Produce once, deliver many, and never let one destination hold the others hostage.”

The three promises

1

Decoupling

Applications know only one address. Which backends exist behind that address is a private matter of the telemetry team.

2

Isolation

A problem in one backend should stay inside that backend’s path. Its trouble must not spill over and starve the healthy destinations.

3

Tailoring

Each backend can receive a different version of the data: more detail for one, less for another, sensitive values removed for a third.

Fan-out is not the same as load balancing

These two ideas are often confused. In load balancing, each item goes to just one of several identical receivers so that the work is shared. In fan-out, each item goes to every destination, and the destinations are usually different from each other. Fan-out multiplies copies. Load balancing divides work. Real systems often use both, as you will see in the topology chapter.

IdeaEach item goes toDestinations areMain goal
Fan-outAll destinationsDifferent tools or storesMany audiences, one source
Load balancingOne destinationIdentical copies of one serviceShare the workload
RoutingSelected destinations by ruleDifferent, chosen per itemSend data only where it belongs
Fan-inOne destinationOne pipeline, many sourcesMerge sources into one flow

Notice the row for routing. A mature fan-out design is rarely a blind copy to everything. It is usually a mix: some data goes everywhere, some data goes only to specific places, and some data is trimmed before it leaves. We will build up to that mix step by step.

5How Fan-Out Works Inside the Collector

Understanding the internals explains almost every production surprise.

When a pipeline has several exporters, the Collector places a small internal piece in front of them that is commonly called a fan-out consumer. Its job is to take one batch of data and hand it to each destination in turn. You never configure this piece directly, but knowing it exists helps you predict behavior.

Copies, and when they are made

Data inside the Collector is held in memory. If two consumers were handed the very same memory and one of them changed it, for example by deleting a password field, the other would see the damage. To prevent that, the Collector asks each component whether it modifies data. If a component does modify data, it receives its own private copy. If a component only reads data, the Collector can safely share the original and skip the expensive copy.

Simple Analogy

Imagine a single printed report passed around a table. People who only read it can share one sheet. But anyone who wants to scribble in the margins or black out a paragraph must first be given a photocopy, otherwise the others would see the scribbles.

This is why adding a processor that edits data, such as one that removes sensitive labels, can increase memory use when it sits in a fan-out position. It is also why read-only components are cheaper. The Collector tries hard to avoid needless copying, but it cannot copy for free.

One after another, not all at once

An important detail is that the fan-out step hands data to its consumers one after another in the same flow of work. It does not wake up a separate worker for each backend. If one consumer takes a long time to accept the data, the next consumer waits. This sounds worrying, but it is exactly why exporters have queues, which the reliability chapter explains. A queue lets the exporter accept data instantly and do the slow network work later in the background.

What happens when one destination says no

If one consumer reports an error, the fan-out step still tries the others and then reports a combined result back upstream. The receiver at the front door may then tell the sending application that the data was not fully accepted, and many senders will retry. The consequence is subtle. A failure in one backend can make the sender resend data that other backends already received, producing duplicates. Good designs prevent this by giving each backend its own queue so that its failures are absorbed locally instead of travelling backwards.

flowchart TD
  R["Receiver"] --> P1["Shared processors"]
  P1 --> F["Fan-out step"]
  F --> E1["Exporter A with queue"]
  F --> E2["Exporter B with queue"]
  F --> E3["Exporter C with queue"]
  E1 --> B1["Backend A"]
  E2 --> B2["Backend B"]
  E3 --> B3["Backend C"]
        
FIG 2 — Inside one pipeline: shared processing, a fan-out step, and one queue per destination
!
Common Misconception

Many people believe fan-out runs every exporter in a fully parallel and independent way by default. In reality the hand-off is sequential, and independence comes from queues and careful pipeline design. Without queues, a slow backend can slow the whole pipeline.

6Two Places to Fan Out: The SDK or the Collector

You can copy data inside the application or outside it. The choice has big consequences.

The OpenTelemetry SDK inside an application allows you to register more than one exporter. So technically you can do fan-out right inside the program that creates the data. Many beginners start there because it seems simple: add another destination and you are done. However, this approach pushes the cost and the risk into every application.

Fan-out inside the application

With SDK-level fan-out, each application must know the addresses, passwords and protocols of every backend. Every extra exporter uses processor time, memory and network bandwidth of the application itself. If a backend is slow, the application’s background threads can fill up, and at worst the business program suffers. Changing the list of backends needs a new release of every service.

Fan-out in the Collector

With Collector-level fan-out, the application sends one stream and is finished. The Collector, which is purpose-built for moving data, handles copying, retrying, queuing and secrets. Changing a destination is a configuration change on a handful of Collector instances. The application cost stays flat no matter how many backends you add.

QuestionFan-out in the SDKFan-out in the Collector
Who knows the backend passwords?Every applicationOnly the Collector
Cost to the applicationGrows with each backendStays constant
Changing a backendRedeploy many servicesUpdate Collector settings
Per-backend filteringHard and repeated everywhereNatural, in one place
Extra network hopNoneOne hop to the Collector
Best suited forTiny setups and experimentsProduction and shared platforms
i
Rule of Thumb

Let the application send once to a nearby Collector, and let the Collector do the multiplying. The only common reason to fan out in the SDK is a very small system where running a Collector is genuinely not possible.

There is a trade-off worth admitting. The Collector adds one more moving part that someone must run, watch and upgrade. For a single small service with a single backend, that effort may not be justified. For anything shared by several teams or several backends, the effort pays for itself quickly.

7Pattern One: Several Exporters in One Pipeline

The simplest form of fan-out, and the right place to start learning.

In this pattern there is one pipeline for a signal, a shared set of processors, and a list of two or more exporters at the end. Every item that survives the processors is copied to every exporter. It is easy to understand, easy to configure, and often exactly what you need during a vendor migration.

Migration with a safety net

A team wants to move from an old monitoring tool to a new one. For several weeks they send all data to both. Engineers compare dashboards side by side, gain confidence, and only then switch off the old exporter. If the new tool misbehaves, the old one is still there.

Hot storage plus cold archive

Recent data goes to an expensive, fast tool that engineers use daily. The same data also goes to cheap object storage that auditors can query once a year. Both consumers see identical content.

Strengths of this pattern

Advantages

  • Very small configuration that is easy to read and review
  • Every backend sees exactly the same data, which makes comparisons fair
  • Adding or removing a backend is a one-line change in the exporter list
  • Works for any signal type
  • Ideal for short migrations and proofs of concept

Disadvantages / Trade-offs

  • All backends share the same processors, so tailoring per backend is impossible
  • Sequential hand-off means exporters without queues can slow each other
  • Sensitive data removed for one destination is removed for all
  • Costs multiply because every backend receives the full volume

The shared-processor limitation is the main reason teams outgrow this pattern. The moment two backends need different treatment, such as full detail for one and a trimmed version for another, a single pipeline is no longer enough. That leads us to the next pattern.

8Pattern Two: A Separate Pipeline for Each Backend

Give each destination its own assembly line while sharing one front door.

In this pattern, one receiver feeds several pipelines at the same time. Each pipeline has its own processors and its own exporter. Because the pipelines are separate, each backend gets a personalized version of the data. Because they share a receiver, applications still send only once.

flowchart LR
  R["OTLP Receiver"] --> PA["Pipeline A: full detail"]
  R --> PB["Pipeline B: sensitive data removed"]
  R --> PC["Pipeline C: sampled for cost"]
  PA --> EA["Exporter A"] --> BA["Debugging backend"]
  PB --> EB["Exporter B"] --> BB["Security backend"]
  PC --> EC["Exporter C"] --> BC["Long-term archive"]
        
FIG 3 — One receiver feeding three tailored pipelines

Why this is the workhorse of real deployments

Each pipeline can contain a different mix of processors. The debugging pipeline might keep everything. The security pipeline might hide personal details and keep only certain events. The archive pipeline might keep one item out of every ten to save money. None of these choices affects the others.

Isolation also improves. Each pipeline has its own instance of every processor and its own queue to its exporter. Memory limits and batching therefore apply separately, and a backlog in the archive path does not block the debugging path. This is the closest the Collector gets to true independence between destinations.

Simple Analogy

Think of a restaurant kitchen that takes one order slip and sends it to three stations: grill, salad and dessert. Each station prepares its own part its own way and at its own speed. A delay at the grill does not stop the dessert from being served.

!
Watch the Cost

Separate pipelines mean separate copies of data in memory and separate processing work. If you run ten pipelines, the Collector does roughly ten times the processing for the shared part. Put cheap, shared steps such as memory protection at the start, and only duplicate the expensive steps where they are truly needed.

Choosing between pattern one and pattern two

SituationBetter choice
All backends need identical dataOne pipeline, many exporters
Backends need different filtering or samplingSeparate pipelines
One backend is slow or unreliableSeparate pipelines, for stronger isolation
Temporary migration for a few weeksOne pipeline, many exporters
Compliance requires different handling per destinationSeparate pipelines

9Pattern Three: Connectors for Routing and Derived Data

Connectors let pipelines talk to each other, which unlocks smarter fan-out.

So far every copy went to every pipeline. Often that is wasteful. A connector is a bridge between pipelines. It is the exporter at the end of one pipeline and the receiver at the start of another, so data can hop from one assembly line to the next without leaving the Collector.

Connector Type

Forward

Passes data unchanged from one pipeline to another. It is useful for merging several pipelines into one or splitting a shared stage from separate ones.

Connector Type

Routing

Looks at labels or conditions on each item and sends it to a chosen pipeline. This turns blind copying into rule-based delivery.

Connector Type

Span-to-Metrics

Reads traces and produces metrics such as request counts and durations. One signal fans out into a different signal.

Connector Type

Count

Counts how many spans, log records or metric points passed by, and publishes that count as a new metric.

Selective fan-out with routing

Imagine one company running services for two customers, and each customer insists that its telemetry go only to its own backend. A routing connector can read a customer label on every item and steer it to the correct pipeline. Nobody receives data that does not belong to them. This is fan-out with brains: still one entry point, but a decision about where each item goes.

flowchart LR
  R["Receiver"] --> RT{"Routing connector"}
  RT -->|"customer one"| P1["Pipeline for customer one"]
  RT -->|"customer two"| P2["Pipeline for customer two"]
  RT -->|"everything else"| P3["Default pipeline"]
  P1 --> X1["Backend one"]
  P2 --> X2["Backend two"]
  P3 --> X3["Shared backend"]
        
FIG 4 — Rule-based routing sends each item only where it belongs

Turning traces into metrics on the way out

Storing every trace for months is expensive, but the high-level numbers derived from them are cheap. With a span-to-metrics connector, the traces pipeline can feed a metrics pipeline. You then send the detailed traces to a short-retention tool and the compact metrics to a long-retention tool. This is a second flavor of fan-out in which one input becomes two different kinds of output.

i
Design Hint

Use routing when data has a natural owner, such as a team, a customer, a region or an environment. Use plain fan-out when every destination legitimately needs everything. Mixing the two in one Collector is common and perfectly healthy.

10Pattern Four: Agent and Gateway Tiers

At scale, fan-out becomes a layered topology instead of one Collector.

One Collector is fine for a demo. A company with thousands of application instances needs layers. The usual layout has two tiers. Small agent Collectors run next to the applications, for instance one per server or one per node in a cluster. A smaller number of larger gateway Collectors sit in the middle and perform the heavy work, including the final fan-out to backends.

flowchart LR
  A1["App group 1"] --> AG1["Agent Collector"]
  A2["App group 2"] --> AG2["Agent Collector"]
  A3["App group 3"] --> AG3["Agent Collector"]
  AG1 --> GW["Gateway Collector pool"]
  AG2 --> GW
  AG3 --> GW
  GW --> B1["Observability backend"]
  GW --> B2["Security backend"]
  GW --> B3["Archive storage"]
        
FIG 5 — Agents collect close to the source; the gateway pool fans out to backends

Why two tiers help

1

Agents keep applications light

The application sends data to something on the same machine, which responds fast. The agent adds standard labels such as the host name and buffers data if the network hiccups.

2

Gateways centralize secrets and policy

Only the gateway holds the credentials for every backend. Rules about what to hide, what to keep and where to send it are changed in one place.

3

Gateways scale independently

When telemetry volume grows, you add more gateway instances without touching the applications or the agents.

Keeping a whole trace together

Some processing, notably deciding which complete traces are worth keeping, requires that all pieces of one trace arrive at the same Collector. If the pieces are scattered across many gateway instances, the decision will be wrong. A load-balancing exporter solves this by choosing the destination from the trace identifier, so every span of one trace reaches the same gateway. Here load balancing and fan-out cooperate: first the data is spread by trace across a set of Collectors, and then each Collector fans out to the backends.

i
Practical Tip

Where you place the fan-out step matters. Doing it at the gateway means the backends see data from a few well-managed senders, which simplifies network rules and credentials. Doing it at the agent multiplies the number of connections to each backend.

11The Life of One Piece of Telemetry

Follow a single span from birth to its final resting places.

It helps to walk through the full journey of one item. We will use a span, which is one step in a trace, from a checkout service in an online store. The same story applies, with small differences, to metrics and logs.

1

The application creates the span

The checkout service starts a step called “charge card”, notes the time, adds labels such as the order size, and ends it when the work is done.

2

The SDK batches and sends it

Instead of sending each span alone, the SDK waits briefly and groups many spans, then sends them over OTLP to the nearby agent.

3

The agent enriches it

The agent receives the span and adds facts the application may not know, such as which machine and which region it ran in, and then forwards it onward.

4

The gateway protects itself

At the gateway the first processor checks memory use. If the Collector is too full, it pushes back so that the system slows down gently instead of crashing.

5

The span is copied to each pipeline

The shared receiver hands the span to every pipeline. Each pipeline has its own rules and works on its own version.

6

Each pipeline tailors the span

One pipeline keeps everything, another removes the card-related labels, and a third decides whether this trace is interesting enough to keep.

7

Exporters queue and batch the spans

Each exporter places the span into its own waiting line and groups it with others to make efficient network calls.

8

Delivery, retry or drop

The exporter sends its batch to the backend. If the backend is busy, the exporter waits and tries again for a limited time. If the waiting line is full or the time runs out, the data is dropped and a counter goes up.

sequenceDiagram
  participant App as Application
  participant Agent as Agent Collector
  participant GW as Gateway Collector
  participant BA as Backend A
  participant BB as Backend B
  App->>Agent: Send batch of spans
  Agent->>Agent: Add host and region labels
  Agent->>GW: Forward batch
  GW->>GW: Check memory then copy to pipelines
  GW->>BA: Deliver full detail version
  GW->>BB: Deliver trimmed version
  BA-->>GW: Accepted
  BB-->>GW: Accepted
        
FIG 6 — A batch of spans travelling from application to two different backends

Every one of those steps is a place where something can be slow, full or broken. A good design assumes that each step will fail some day and decides ahead of time what should happen. The next chapter explains the tools you have for that.

12Reliability: Queues, Retries and Backpressure

The difference between a demo and a production system is what happens on a bad day.

Backends are not perfect. They get upgraded, overloaded, misconfigured and occasionally disappear. A fan-out design multiplies the number of things that can go wrong, because every extra backend is another possible failure. The goal is simple to say and hard to do: one backend’s bad day must not become everyone’s bad day.

The sending queue

A sending queue is a waiting line inside an exporter. Data enters the line immediately and a set of background workers take items off the line and deliver them. This is the single most important isolation tool. With a queue, a slow backend only makes its own line longer. Without one, the slow backend holds up the whole hand-off, and every other destination waits behind it.

Simple Analogy

A queue is a mailbox at the end of your driveway. You drop the letter in and walk away immediately. The mail carrier collects it whenever they pass. If the carrier is late, your letter simply waits in the box, and you were never forced to stand outside.

Retries

When a delivery fails, the exporter can try again after a pause that gets longer each time. This is called retry with backoff. It rescues data from short outages such as a backend restarting. It must have a time limit, because retrying forever fills the queue with old data and hides a real problem.

Memory protection

A memory-limiting processor watches how much memory the Collector uses. When usage gets high, it starts refusing new data so that the Collector never runs out of memory and crashes. Refusing data is unpleasant, but a controlled slowdown is far better than a crash that loses everything in flight. It should be placed first in each pipeline so that it protects everything after it.

Batching

A batching processor groups many small items into larger packages. Larger packages mean fewer network calls, better compression and lower cost at the backend. It is usually placed near the end of the processor list, after filtering has already reduced the volume.

Disk-backed queues

By default, queues live in memory, so a Collector restart loses whatever was waiting. A persistent queue stores waiting data on disk using a storage extension. After a restart the data is still there. The price is slower writes and the need to manage disk space, so teams usually enable this only for the backends where losing data is unacceptable.

ToolWhat it protects againstWhat it costs
Sending queue in memoryShort slowdowns of a backendExtra memory
Retry with backoffBrief outages and network blipsDelayed delivery and duplicates risk
Memory-limiting processorCollector crashing from overloadRefused data under pressure
BatchingToo many tiny network callsSmall added delay
Disk-backed queueData loss during restartsDisk space and slower writes
!
Trap to Avoid

Making queues huge does not make a system reliable. A giant queue in front of a backend that has been down for hours simply stores stale data and then floods the backend when it returns. Reliability comes from sensible limits, alerts, and a clear decision about what to drop.

Backpressure, explained simply

Backpressure is the way a full system tells its upstream neighbors to slow down. When queues fill and memory protection triggers, the Collector starts rejecting new data, and senders respond by waiting or buffering. In a fan-out design you must decide which destinations are allowed to cause backpressure. Usually only the critical ones should. A low-value archive should drop data rather than slow down the primary observability path.

13Security and Compliance in a Fan-Out World

Sending data to many places means many places where it can leak.

Telemetry often contains more than engineers realize. A log line may hold an email address. A trace label may carry a customer number. Once you copy that data to several backends owned by several teams or companies, you have also copied the risk. Fan-out makes security design a first-class concern rather than an afterthought.

Remove what a destination does not need

The principle of least data says each backend should receive only what it needs to do its job. A graphing tool rarely needs customer emails. A security tool might need them but should not share them with outsiders. Separate pipelines allow you to strip, hash or mask sensitive fields on the path to each destination individually.

Technique

Redaction

Deleting a sensitive label completely before data leaves the Collector.

Technique

Hashing

Replacing a value with a scrambled stand-in so that records can still be grouped without revealing the original.

Technique

Masking

Hiding part of a value, such as showing only the last digits of a number.

Technique

Dropping

Removing whole items, such as logs from an internal test system, so they never reach a backend.

Protect the connections and the keys

Every link in the chain should be encrypted, from application to agent, agent to gateway, and gateway to each backend. Credentials for backends should live only in the gateway layer and be loaded from a secrets manager, never pasted into files that many people can read. Authentication on the receiving side prevents strangers from pushing fake data into your Collector.

Data residency and legal boundaries

Some laws require that data about people in a region stay in that region. A fan-out design can respect this by using routing to keep each region’s telemetry inside regional backends, while only anonymous summary numbers travel to a global dashboard. This is much easier to enforce in one central routing layer than inside hundreds of applications.

i
Audit Idea

Treat the Collector configuration as a policy document. Review it like code, keep it under version control, and ask for approval whenever a new backend or a new field is added. The configuration is the single place that answers the question “who receives what?”

ANTI-PATTERN-01 Avoid
Problem

The team copies all raw data to every backend, including a third-party vendor, because that is the quickest setup.

Why It’s Harmful

Sensitive values reach parties who never needed them. A breach or a mistake at any one backend now exposes everything, and compliance reviews become painful.

Correct Approach

Use a separate pipeline per destination, remove or mask sensitive fields on the paths to external tools, and document in one place which backend receives which fields.

14Cost, Performance and Sizing

Fan-out multiplies copies, and copies cost money, memory and bandwidth.

The most common surprise after enabling fan-out is the bill. Backends usually charge by the amount of data they ingest or store. If you send the same stream to three paid backends, you pay roughly three times, even though the application produced it once. Smart fan-out is as much about deciding what not to send as it is about what to send.

Where the multiplication hits

Network
every extra backend adds outgoing traffic from the gateway
Memory
more pipelines and queues hold more data at once
Money
paid backends bill for their own copy

Ways to keep costs under control

1

Filter early

Remove noise, such as health-check requests and debug logs, before data is copied. Anything removed early is removed from every copy.

2

Sample per destination

Keep every item for the destination that supports live debugging, but keep only a fraction for the archive or the backup tool.

3

Convert traces to metrics

Store compact numbers for long periods and keep detailed traces only for a short window.

4

Watch label cardinality

Labels with millions of different values, such as user identifiers on metrics, explode storage cost in every backend that receives them. Fix them once, before the fan-out.

5

Compress and batch

Compression on the wire and decently sized batches reduce bandwidth charges and per-request overhead.

Sizing the Collector

Collector capacity depends on data volume, the number of pipelines, how much processing each does, and how many exporters send. Start by measuring real traffic rather than guessing. Run a representative load, watch processor time and memory, and add a safety margin. Because the gateway tier is stateless in most designs, you can scale it by adding instances, which is easier than rebuilding a single giant server.

!
Sampling Warning

Decisions that need a complete trace, such as keeping only slow or failing traces, must happen after all spans of a trace have gathered at one Collector. Sampling too early, or on partial traces, leaves you with broken stories where the beginning is kept and the end is thrown away.

15Watching the Watcher: Monitoring the Collector

The system that observes everything must itself be observed.

It is an uncomfortable truth that the Collector can fail silently. If it drops data, your dashboards simply look quieter, and people may mistake silence for health. The Collector therefore publishes its own telemetry about how it is doing, and a fan-out setup must pay close attention to it, because every destination has its own queue and its own failure story.

The questions to keep asking

Question 1

Is data arriving?

Compare how much each receiver accepted with how much it refused. A rise in refused data usually means the Collector is protecting itself.

Question 2

Are queues healthy?

Compare the current length of each exporter queue with its capacity. A queue that stays near full means that destination cannot keep up.

Question 3

Is delivery succeeding?

Track how much each exporter sent successfully versus how much failed. Compare destinations against each other to spot the odd one out.

Question 4

Is the Collector itself coping?

Watch processor time, memory use and restarts of the Collector instances.

Send the Collector’s own signals somewhere independent

If the Collector reports its health only through itself, then a failure of the Collector also hides the failure report. Many teams therefore send the Collector’s own metrics to a separate, simple destination, so that the warning system does not depend on the thing it is warning about.

Compare backends to each other

One of the delightful side effects of fan-out is that you have natural reference points. If backend A shows ten thousand requests per minute and backend B shows nine thousand, someone has dropped data. Periodic comparison between destinations is a cheap way to detect silent loss, as long as each backend is meant to receive the same stream.

i
Alert Ideas

Raise an alert when any exporter queue stays above most of its capacity for several minutes, when send failures rise above a small percentage, or when a receiver starts refusing data. Alert per destination, so that you know exactly which branch of the fan is struggling.

16Real-World Scenarios

Six situations where fan-out solves a genuine business problem.

Vendor migration without a big bang

A retail company moves from one commercial monitoring suite to another over a quarter. The Collector sends everything to both while teams rebuild dashboards and alerts. When the new platform proves itself, the old exporter is removed with a single configuration change and no application release.

Observability plus security analytics

An online bank sends logs to an observability tool for engineers and, with personal fields masked, to a security analytics platform that hunts for suspicious behavior. The same event serves two different jobs with two different privacy rules.

Cheap long-term retention

A media company keeps seven days of detailed telemetry in a fast, costly tool and sends a sampled copy to inexpensive object storage for a one-year audit requirement. Only the audit pipeline uses aggressive sampling.

A platform serving many internal teams

A central platform group runs the gateways. Each product team wants its own backend, some use open-source tools and some buy commercial ones. Routing by a team label delivers each team’s data to the tool that team chose, while the platform group also keeps a copy of high-level metrics for company-wide reports.

Multi-tenant software provider

A software company hosts the same application for many customers, and some customers demand their telemetry in their own cloud accounts. A routing rule on the customer label sends each customer’s data to that customer’s destination, and nobody else’s.

Testing a new backend with real traffic

Before committing to a new storage engine, an engineering team mirrors production telemetry into it alongside the current tool. They measure query speed, cost and reliability using genuine data volume, which no synthetic test can match.

“The best fan-out designs make adding the next backend boring.”

Notice the shape of these stories. In every one, the business wanted more than one audience for the same facts, and they wanted to change audiences without disturbing the source. That is the heart of the architecture.

17Advantages, Disadvantages and Trade-offs

Every architecture is a bargain. Here is what you gain and what you pay.

Advantages

  • Applications stay simple and send to one address
  • Backends can be added, swapped or removed with no application releases
  • Credentials and policy are centralized and easier to audit
  • Each backend can receive tailored data in separate pipelines
  • Safer migrations because old and new tools run side by side
  • Comparison between backends exposes silent data loss

Disadvantages / Trade-offs

  • The Collector becomes critical infrastructure that someone must operate
  • Costs multiply across network, memory and paid backends
  • Configuration grows complex as pipelines and rules accumulate
  • Retries can create duplicates in some destinations
  • A mistake in the central layer affects every backend at once
  • An added network hop slightly increases delay

The trade-offs in plain terms

Fan-out trades simplicity at the edge for responsibility at the center. You remove complexity from hundreds of applications and concentrate it in a small, expert-managed layer. This is usually a good trade, because it is much easier to keep a few Collectors healthy than to keep every application correctly configured. But it only works if that central layer is treated as a real product with owners, tests, version control and on-call support.

ConcernWithout fan-out layerWith a Collector fan-out layer
Adding a backendChange and release many applicationsEdit Collector settings
Secret handlingSpread across many servicesConcentrated in the gateway
Blast radius of a bad changeOne application at a timePotentially all telemetry
Operational effortLow platform effort, high team effortHigher platform effort, lower team effort
FlexibilityLowHigh

That row about blast radius deserves emphasis. Centralization makes changes easy, and it makes mistakes easy too. A typo in a gateway setting can break delivery to every backend simultaneously. This is why mature teams test configuration changes in a staging environment, roll them out gradually to a few Collectors first, and keep a quick way to roll back.

18Design Patterns and Anti-Patterns

Habits worth copying, and habits worth running away from.

Patterns worth adopting

Pattern

Protect first, batch last

Place the memory-limiting step at the start of every pipeline and the batching step near the end, with filtering and tailoring in between.

Pattern

One queue per destination

Give each backend its own sending queue and its own limits so failures stay local.

Pattern

Critical versus best-effort

Classify destinations. Critical ones get disk-backed queues and alerts. Best-effort ones are allowed to drop data under pressure.

Pattern

Tiered topology

Use agents near the source and a gateway pool for policy, routing and final fan-out.

Pattern

Standard labels at the edge

Add service, environment, region and team labels as early as possible, so that routing and filtering later can rely on them.

Pattern

Configuration as code

Keep Collector settings in version control with reviews, tests and gradual rollout.

Anti-patterns to avoid

ANTI-PATTERN-02 Avoid
Problem

Every application is configured to send directly to every backend, so the application owners manage keys and addresses for each tool.

Why It’s Harmful

Each new backend requires coordinated releases. Secrets sprawl everywhere. A slow backend can degrade business applications directly.

Correct Approach

Send once to a Collector and let the central layer handle copying, retries and credentials.

ANTI-PATTERN-03 Avoid
Problem

A single pipeline with no queues fans out to several backends, one of which is frequently slow.

Why It’s Harmful

The sequential hand-off means the slow backend delays delivery to the healthy ones, and failures travel backwards to the senders, which resend data and cause duplicates.

Correct Approach

Enable a sending queue on every exporter, use separate pipelines for unreliable destinations, and set time limits on retries.

ANTI-PATTERN-04 Avoid
Problem

The team sends one hundred percent of all signals to every backend forever, long after the migration or experiment that justified it has ended.

Why It’s Harmful

Costs grow silently, and nobody remembers why a given destination still receives data. Old backends may even hold sensitive information that no one is reviewing.

Correct Approach

Give every destination an owner and a reason. Review the list regularly and remove destinations that no longer serve a purpose.

ANTI-PATTERN-05 Avoid
Problem

Trace sampling is performed on whichever gateway instance happens to receive each batch, without keeping traces together.

Why It’s Harmful

Pieces of the same trace are judged separately, so some are kept and some are dropped. Engineers then see incomplete, misleading traces.

Correct Approach

Route all spans of one trace to the same Collector using the trace identifier before making any whole-trace decision.

19Best Practices and Common Mistakes

A practical checklist you can use before going live.

Best practices

1

Start simple, then specialize

Begin with one pipeline and two exporters. Move to separate pipelines only when a real need for tailoring appears.

2

Decide the failure behavior for each backend in advance

For each destination, write down whether it should block, retry, buffer on disk or drop. Make the configuration match that decision.

3

Normalize data before it fans out

Fix naming, labels and noisy values once at the start so that every backend benefits from the same clean input.

4

Send the Collector’s own health data to an independent place

Make sure alarms still work when the Collector itself is in trouble.

5

Roll out changes gradually

Test in staging, update a small slice of Collectors first, watch the queue and failure indicators, then continue.

6

Load test with realistic traffic

Include a simulated backend outage in the test to prove that isolation really works.

7

Document the data map

Keep a simple table showing which signal and which fields reach which backend, who owns it, and why.

Common mistakes

!
Mistake 1

Assuming a backend is receiving data because the exporter shows no errors. Always verify by comparing counts or by running a test query at the backend.

!
Mistake 2

Putting an expensive processing step in front of the fan-out when only one destination needs it. Move it into that destination’s own pipeline so others do not pay for it.

!
Mistake 3

Forgetting that queues in memory vanish on restart. If a backend is critical, plan for persistence or accept the loss knowingly.

!
Mistake 4

Treating every destination as equally important. When everything is critical, nothing is, and one noisy low-value backend can drag down the most important one.

!
Mistake 5

Letting labels multiply without control. Each new label with many values makes every backend more expensive and slower to query.

20A Decision Guide: Which Shape Should You Choose?

Match the architecture to the size and needs of your organization.

There is no single correct fan-out design. A startup with ten services and a company with ten thousand have different needs. The guide below helps you choose a sensible starting point and shows when to evolve.

flowchart TD
  S["Start: do you need more than one backend?"] -->|"No"| N["Single exporter, keep it simple"]
  S -->|"Yes"| Q1{"Do all backends need identical data?"}
  Q1 -->|"Yes"| P1["One pipeline with several exporters"]
  Q1 -->|"No"| Q2{"Is data owned by team, customer or region?"}
  Q2 -->|"Yes"| P3["Routing connector to separate pipelines"]
  Q2 -->|"No"| P2["Separate pipelines with tailored processors"]
  P1 --> Q3{"Large scale or many applications?"}
  P2 --> Q3
  P3 --> Q3
  Q3 -->|"Yes"| T["Add agent and gateway tiers"]
  Q3 -->|"No"| D["Single Collector tier is enough"]
        
FIG 7 — A simple decision path from one backend to a tiered, routed design
Organization stageTypical shapeMain concern
Small team, one or two servicesOne Collector, one pipeline, one or two exportersKeeping effort low
Growing company, several teamsGateway Collectors with separate pipelinesTailoring and isolation
Large enterpriseAgents plus gateway pool, routing by team or regionPolicy, cost and compliance
Regulated industryTiered, routed, with strict redaction per destinationAudit and data residency
Software provider with many customersTenant-based routing to customer destinationsStrict data separation

Evolve in small steps. Every additional layer adds capability and operational duty. Add a layer only when you can name the problem it solves, and remove complexity when the problem it solved has gone away.

21Frequently Asked Questions

Short, direct answers to the questions people ask most.

Q1Does fan-out slow down my application?

Not when the copying happens in the Collector. The application sends one stream to a nearby Collector and returns to its work. The cost of extra backends is paid by the Collector, not by the business program.

Q2Will each backend receive exactly the same data?

Only if you use one shared pipeline with several exporters. With separate pipelines, each backend can receive a different version, with different filtering, sampling or redaction.

Q3What happens if one backend is down?

The exporter for that backend retries for a limited time and holds data in its queue. If the outage lasts longer than the queue and retry limits allow, data for that backend is dropped. Healthy backends should continue to receive data as long as each has its own queue.

Q4Can I send traces to one backend and logs to another?

Yes. Pipelines are defined per signal, so every signal has its own list of exporters. It is very common to mix different tools for different signals.

Q5Is fan-out the same as high availability?

No. Fan-out sends copies to different destinations. High availability keeps a service running when parts fail. They can support each other, for example by running several gateway instances, but they solve different problems.

Q6Can duplicate data appear in a backend?

It can. If a sender resends data after a partial failure, a backend that had already accepted the data may receive it twice. Per-destination queues and careful retry limits reduce the chance, and many backends can tolerate or remove duplicates.

Q7Do I need agents and gateways, or is one Collector enough?

A single Collector tier is enough for small and medium systems. Add the two-tier layout when you have many application instances, need central control of policy and secrets, or require trace-aware routing at scale.

Q8Does fan-out work for metrics and logs the same way as for traces?

The fan-out concept is identical, but practical concerns differ. Metrics are small but sensitive to label explosion. Logs are large and often contain personal information. Traces need special care for sampling. Treat each signal on its own terms.

Q9How do I know that no data is being lost?

Watch the Collector’s own counters for refused and failed items, watch queue fullness, and compare ingestion counts between backends that are meant to receive the same stream. A regular comparison catches silent loss early.

Q10Is it safe to send the same data to an external vendor?

It can be, provided you remove or mask sensitive fields on the path to that vendor, encrypt the connection, restrict credentials, and confirm that the vendor’s data handling meets your legal obligations.

Q11Why not simply let each backend pull data itself?

Some systems do work that way, especially for metrics. But many telemetry flows are push based, and pulling from every application by every backend would multiply connections and complicate security. A central push layer gives control that a crowd of pullers cannot.

Q12When should I remove a backend from the fan?

Remove it when nobody uses it, when it duplicates another tool without extra value, or when its cost exceeds its benefit. Every destination should have a named owner and a stated purpose, and destinations without both are candidates for removal.

22Summary and Key Takeaways

A multi-backend fan-out architecture lets you produce telemetry once and deliver it to many destinations without burdening your applications. The OpenTelemetry Collector provides the natural home for this idea, because pipelines can have several exporters, several pipelines can share a receiver, and connectors can route or transform data between pipelines. The design challenge is not turning fan-out on. It is keeping destinations independent, controlling cost, protecting sensitive data, and watching the system that watches everything else.

Start with the simplest shape that works, move to separate pipelines when different destinations need different treatment, and add routing and tiers only as scale and policy demand. Give every backend its own queue, a clear failure rule, an owner and a reason to exist. If you do those things, adding the next backend, or retiring an old one, will feel almost boring, and that is the best compliment a piece of infrastructure can earn.

Key Takeaways

  • Produce once, deliver many — fan-out separates the source of telemetry from its destinations, so changing backends never requires changing applications.
  • The Collector is the right place — copying inside the SDK taxes every application, while Collector-level fan-out keeps application cost flat and secrets centralized.
  • Pipelines shape the copies — several exporters in one pipeline give identical data to all, while separate pipelines allow per-destination filtering, sampling and redaction.
  • Connectors add intelligence — routing sends data only where it belongs, and span-to-metrics connectors turn one signal into another for cheaper retention.
  • Isolation comes from queues — the hand-off to exporters is sequential, so give each destination its own sending queue, bounded retries and memory protection.
  • Fan-out multiplies cost and risk — filter early, sample per destination, remove sensitive fields, and treat every extra backend as a deliberate decision.
  • Observe the Collector itself — monitor queues, refusals and failures per destination, and compare backends against each other to catch silent data loss.