cloudfoundry/cloud_controller_ng

View on GitHub
docs/v3/source/includes/resources/routes/_destination_object.md.erb

Summary

Maintainability
Test Coverage

### The destination object

```
Example Destination object
```
```json
<%= yield_content :single_destination %>
```

A destination represents the relationship between a route and a resource that can serve traffic (for example, the `web` process of an application).

When a route has destinations, that route will direct traffic to the processes represented by those destinations.

If a destination is created with a port specified, the route will direct traffic to that port on the process. A destination with port 9000 and process type `api` means traffic will be directed to the `api` process running on container port 9000.

Note that when using a custom port, the app process must be listening on the specified port for the mapping to work. Otherwise, visiting the route will result in a 404 error.

If a destination does not specify a port, the default port depends on the app lifecycle type. For buildpack apps, traffic will be directed to port 8080. For Docker apps, the first port specified in the Dockerfile will be used.

| Name                      | Type                     | Description                                                                                                                                                                                                                                                                                       |
|---------------------------| ------------------------ |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **guid**                  | _uuid_                   | Unique identifier for the destination                                                                                                                                                                                                                                                             |
| **app.guid**              | _uuid_                   | Unique identifier for the app to route traffic to                                                                                                                                                                                                                                                 |
| **app.process.type**      | _string_                 | Type of the process belonging to the app to route traffic to                                                                                                                                                                                                                                      |
| **port**                  | _integer_                | Port on the destination process to route traffic to
| **weight** (*deprecated*) | _integer_ or `null`      | Percentage of traffic which will be routed to this destination. _**DEPRECATED:** this feature was only available via the experimental Service Mesh routing plane. It is no longer supported._                                                                                                     |
| **protocol**              | _string_ or `null`       | Protocol to use for this destination. Valid protocols are `http1` or `http2` if route protocol is `http`, `tcp` if route protocol is `tcp`. A `null` value will set it either `http1` or `tcp` based on the route protocol; _this feature is only available if you turn it on in routing release_ |