> For the complete documentation index, see [llms.txt](https://docs.release.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.release.com/guides-and-examples/domains-and-dns/routing-traffic.md).

# Routing traffic

### How Release routes traffic to your environments

When you create environments on Release, we generate hostnames that are [instantly available](#instant-domain-updates), [unique](#how-releasehub-creates-unique-hostnames), and [predictable](#creating-predictable-hostnames-using-environment-handles).

### Instant domain updates

Traditional DNS is too slow for the fast-paced traffic routing required when creating ephemeral environments.

To avoid having to wait for DNS propagation every time you launch a new environment, Release uses a proprietary Lambda\@Edge routing infrastructure that makes domain updates instant.

Each incoming request to CloudFront runs a Lambda\@Edge function to check the request URL against a routing table stored in DynamoDB so that Release can instantly route and reroute traffic to your environments.

For dynamic services such as web servers or APIs, Release creates a routing entry that points requests to the Application Load Balancer for your environments' Kubernetes clusters.

For static sites, Release takes the bucket hostname and path, including a list of any assets written to S3 for the version being deployed, and adds those entries to our routing table.

Release takes care of maintaining this routing table when you create or delete environments.

### How Release creates unique hostnames

If you're a self-hosted user with a custom domain, say, `example.com`, hostnames for your ephemeral environments will follow this pattern:

`service_name-${randomness}-app_name.example.com`

Here is an example hostname for an app called `portal` and a service called `api`:

`api-t9yhp25-portal.example.com`

### Creating *predictable* hostnames using environment handles

You can create [environment handles](/reference-documentation/account-settings/environment-handles.md) to replace the random string in an environment's hostnames. This enables Release to create, or re-use, unique hostnames from a pre-determined list.

This is useful for services where it is expected that hostnames are known in advance, for example, when manually whitelisting callback domains at your OAuth provider.

When an environment is deleted, the environment handle used for the environment's hostname is returned to the pool of available handles and can be re-used for new environments.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.release.com/guides-and-examples/domains-and-dns/routing-traffic.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
