# Deploy a Bindplane Gateway

The Bindplane [Gateway pattern](https://bindplane.com/blog/how-to-build-resilient-telemetry-pipelines-with-the-opentelemetry-collector-high-availability-and-gateway-architecture) routes telemetry from edge collectors through a central gateway collector using two paired components:

* [**Bindplane Gateway Destination**](/integrations/destinations/bindplane-gateway.md) in a configuration rolled out to each edge collector
* [**Bindplane Gateway Source**](/integrations/sources/bindplane-gateway.md) on the gateway

This prevents double-counting of telemetry in the Bindplane Summary view.

{% hint style="info" %}
This guide covers the Bindplane Gateway telemetry pattern (telemetry data routing). For the OpAMP Gateway — a separate feature that relays OpAMP management traffic between Bindplane and collectors — see the [OpAMP Gateway feature guide](/feature-guides/deployment-and-management/opamp-gateway.md).
{% endhint %}

### Prerequisites

* Bindplane Collector **v1.52.0 or later** on all agent and gateway hosts
* A dedicated host (or hosts) for the gateway role, separate from monitored hosts
* Network access: edge collectors must reach the gateway on port **4317** (gRPC) or **4318** (HTTP)
* Destination credentials only needed on gateway host(s)

### Set Up a Single-Node Gateway

![Edge collectors in a DaemonSet forward telemetry to a single Bindplane Collector Gateway, which fans out to multiple destinations.](/files/Jb0VP2ALVlz5QpVviPLK)

#### Step 1: Create the Gateway Configuration

1. In the Bindplane UI, go to **Configurations** and click **New Configuration**. Select the **Gateway** collector type.
2. Add a **Bindplane Gateway Source**. Defaults work for most deployments — gRPC on port `4317`, HTTP on port `4318`, listening on `0.0.0.0`. Enable TLS if agents connect over an untrusted network.

![Gateway Configuration with a Bindplane Gateway Source added.](/files/njmp0n1dqwsHez4cn5UC)

![Bindplane Gateway Source settings showing port and listen address fields.](/files/PP7BNWtyOGauX3ffSm6M)

3. Add any processors to run centrally (filtering, enrichment, sampling).
4. Add your final destination(s). Destination credentials live here — not on edge collectors.
5. Save and deploy to your gateway host.

#### Step 2: Configure Edge Collectors

1. Open or create a configuration in Bindplane.
2. Keep existing sources. Remove any direct destinations.
3. Add a **Bindplane Gateway Destination**:
   * **Hostname:** gateway host IP or hostname
   * **Port:** `4317` (gRPC) or `4318` (HTTP)
   * **Protocol:** gRPC is recommended for production

![Edge collector configuration with a Bindplane Gateway Destination added.](/files/NwZGC8ewoWVyprLUdZJi)

![Bindplane Gateway Destination settings panel showing hostname and port.](/files/vQwXUVq9iCFrrtpbryiG)

4. Save and deploy to edge collectors.

{% hint style="success" %}
Enable **Persistent Queue** and **Retry on Failure** on the Bindplane Gateway Destination. This buffers telemetry to disk on the agent if the gateway becomes temporarily unreachable. See [Configure Collector Queue Size](/how-to-guides/data-collection-and-processing/configure-collector-queue-size.md) for sizing guidance.
{% endhint %}

#### Step 3: Verify Data Flow

1. Open the **Visualize** view. Telemetry should appear flowing through a Gateway.
2. In the **Gateway Configuration**, verify inbound traffic from edge collectors (Bindplane Gateway Source).

![Bindplane Gateway data flow validation.](/files/EKV5t4XIOmUiEqOEfEV0)

### Set Up a Multi-Node Gateway (High Availability)

Run two or more gateway nodes behind a load balancer. Size the cluster so remaining nodes can handle full load if one goes offline (N+1).

![Edge collectors in a DaemonSet forward telemetry through a Load Balancer to a set of Bindplane Gateway Collectors, which fan out to multiple destinations.](/files/6VgpshRTFrb3KS1ox3hm)

Deploy the same gateway configuration to all nodes. Bindplane manages configuration consistency across the cluster.

#### Option 1: External Load Balancer (Nginx or cloud LB)

The simplest option. A standard TCP load balancer forwards port `4317` (gRPC) or `4318` (HTTP) across gateway nodes. Update the **Hostname** in the Bindplane Gateway Destination to point at the load balancer.

Example Nginx upstream for gRPC:

```nginx
upstream otel_gateway {
    server gateway-1:4317;
    server gateway-2:4317;
    server gateway-3:4317;
}

server {
    listen 4317 http2;
    location / {
        grpc_pass grpc://otel_gateway;
    }
}
```

{% hint style="warning" %}
Each gateway node must have its own persistent queue storage volume. Do not share a single volume across nodes — the queue is tied to a specific collector process.
{% endhint %}

#### Option 2: OTel Load Balancing Exporter

The OTel `loadbalancing` exporter routes telemetry across backend gateway collectors while keeping spans from the same trace on the same node. Use this option when running trace sampling at the gateway tier — a round-robin LB splits traces across nodes, breaking head-based and tail-based samplers.

{% hint style="info" %}
Use the load balancing exporter only when trace sampling correctness matters. For logs and metrics only, Option 1 is simpler.
{% endhint %}

#### Option 3: Kubernetes — Deployment + HPA

* Run gateway nodes as a **Deployment** exposed via a **ClusterIP Service**
* Use a **HorizontalPodAutoscaler** to scale replicas (e.g. 2–10) based on CPU
* Edge agents (DaemonSet) point their Bindplane Gateway Destination at the ClusterIP service

Kubernetes ClusterIP endpoints for the Bindplane Gateway Source:

| Protocol | Service            | Endpoint                                                                  |
| -------- | ------------------ | ------------------------------------------------------------------------- |
| gRPC     | clusterIP          | `bindplane-gateway-agent.bindplane-agent.svc.cluster.local:4317`          |
| gRPC     | headless clusterIP | `bindplane-gateway-agent-headless.bindplane-agent.svc.cluster.local:4317` |
| HTTP     | clusterIP          | `http://bindplane-gateway-agent.bindplane-agent.svc.cluster.local:4318`   |

{% hint style="info" %}
Use the **Gateway** collector type (Deployment) rather than the Node collector type (DaemonSet) for the gateway tier. The Gateway collector scales independently of cluster node count.
{% endhint %}

### Related Resources

* [Bindplane Gateway Source](/integrations/sources/bindplane-gateway.md)
* [Bindplane Gateway Destination](/integrations/destinations/bindplane-gateway.md)
* [Agents vs. Gateways](/production-checklist/bindplane-otel-collector/agents-v.-gateways.md)
* [Configure Collector Queue Size](/how-to-guides/data-collection-and-processing/configure-collector-queue-size.md)
* [Reduce Telemetry Ingestion Costs](/how-to-guides/data-collection-and-processing/reduce-telemetry-ingestion-costs.md)
* [Self-Hosted Bindplane Enterprise Deployments](/how-to-guides/infrastructure-and-operations/self-hosted-enterprise-deployment.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bindplane.com/how-to-guides/collector-management/deploy-bindplane-gateway.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
