# Stream Routes

In this document, you will learn the basic concept of stream routes in APISIX and why you may need them.

Explore additional resources at the end of the document for more information on related topics.

## Overview[​](#overview "Direct link to Overview")

In APISIX, a *stream route* object is used to create a route when APISIX functions as a stream proxy, operating on the [transport layer](https://en.wikipedia.org/wiki/Transport_layer) for TCP and UDP connections. This is analogous to the concept of routes in cases where APISIX functions as an [application-layer](https://en.wikipedia.org/wiki/Application_layer) proxy.

The following diagram shows two clients connecting to APISIX at `192.168.1.10:9500`. The stream route uses `remote_addr` to match connections from `192.168.40.3`, then proxies them to the MySQL upstream:

![A client at 192.168.40.3 matches a Stream Route and connects through APISIX to a MySQL upstream; another client does not match](https://static.api7.ai/uploads/2026/11/04/HVKzaDJK_stream-routes.svg)

<br />

A stream listener accepts TCP or UDP connections, while a stream route matches those connections and selects an upstream. A stream route can distinguish connections by client address, listener address or port, and TLS server name. Depending on the listener setup, APISIX can terminate TLS or pass the encrypted connection through to the upstream. Creating a stream route does not create or expose a listener.

For configuration examples, see [Proxy Transport Layer (L4) Traffic](https://docs.api7.ai/apisix/how-to-guide/traffic-management/proxy-transport-layer-l4-traffic.md). For the complete resource schema, see the [Admin API reference for stream routes](https://docs.api7.ai/apisix/reference/admin-api.md#tag/Stream-Routes).

## Additional Resources[​](#additional-resources "Direct link to Additional Resources")

* Getting Started - [Configure Routes](https://docs.api7.ai/apisix/getting-started/configure-routes.md)
* Key Concepts - [Routes](https://docs.api7.ai/apisix/key-concepts/routes.md)
* Admin API - [Stream Routes](https://docs.api7.ai/apisix/reference/admin-api.md#tag/Stream-Routes)
