# Outgoing Traffic

By default, mirrord intercepts outgoing network requests from your local process and routes them through the remote pod. This means your local code can access cluster-internal services - databases, APIs, message brokers - as if it were running inside the cluster.

This works through three mechanisms:

1. **Environment variables** - Your local process inherits the remote pod's environment variables, so connection strings and hostnames point to the right places
2. **DNS resolution** - mirrord resolves DNS queries in the context of the remote pod, so cluster-internal hostnames (like `my-service.default.svc.cluster.local`) resolve correctly
3. **Network interception** - Outgoing TCP and UDP connections are sent from the remote pod, giving your local process access to resources that are only reachable from within the cluster

Both outgoing TCP and UDP forwarding are enabled by default.

{% hint style="warning" %}
If mirrord is configured to **mirror** incoming traffic, both the remote pod and your local process may make outgoing API calls for the same incoming request. If those calls are write operations (e.g. database inserts), this could lead to duplicates. Consider using [steal mode](/mirrord/docs/using-mirrord/incoming-traffic.md) or disabling outgoing traffic forwarding to avoid this.
{% endhint %}

### What's in this section

* [**Filter Outgoing Traffic**](/mirrord/docs/using-mirrord/outgoing-traffic/filter-outgoing-traffic.md) - Control which outgoing connections go through the cluster and which stay local


---

# 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://metalbear.com/mirrord/docs/using-mirrord/outgoing-traffic.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.
