Destinations

A Destination represents a backend service that Vrata can forward traffic to. It’s the bridge between your proxy and your upstream applications.

What a destination does

  1. Identifies the backend — by hostname and port, or by an explicit list of endpoints
  2. Manages connections — connection pooling, timeouts, TLS to upstream
  3. Balances across endpoints — when a destination has multiple pods/IPs, picks which one handles each request
  4. Protects the backend — circuit breakers, health checks, outlier detection
  5. Discovers pods — optional Kubernetes EndpointSlice watching for automatic pod discovery

Destinations are independent entities. Multiple routes can forward to the same destination. When you update a destination, every route that references it benefits automatically.

Creating a destination

curl -X POST localhost:8080/api/v1/destinations \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "api-service",
    "host": "api-svc.default.svc.cluster.local",
    "port": 80
  }'

Structure

{
  "name": "api-service",
  "host": "api-svc.default.svc.cluster.local",
  "port": 80,
  "endpoints": [
    {"host": "10.0.1.10", "port": 8080}
  ],
  "options": {
    "timeouts": { ... },
    "endpointBalancing": { ... },
    "circuitBreaker": { ... },
    "healthCheck": { ... },
    "outlierDetection": { ... },
    "tls": { ... },
    "discovery": { ... },
    "http2": false,
    "maxConnsPerHost": 0
  }
}

All fields

FieldTypeDefaultDescription
namestringrequiredUnique name
hoststringrequiredBackend hostname or IP
portnumberrequiredBackend port
endpointsarrayExplicit endpoint list (host + port per entry)
optionsobjectAll advanced options (see below)

All options

OptionTypeDescriptionDetails
timeoutsobject7 granular timeouts for every stage of the upstream connectionTimeouts
endpointBalancingobject6 algorithms for picking which pod handles each requestEndpoint Balancing
circuitBreakerobjectStop sending traffic when consecutive errors cross a thresholdCircuit Breaker
healthCheckobjectActive HTTP probes to detect unhealthy endpointsHealth Checks
outlierDetectionobjectPassive ejection based on real traffic errorsOutlier Detection
tlsobjectEncrypt connections to backends (TLS, mTLS)TLS to Upstream
discoveryobjectAuto-discover pod IPs via EndpointSlice watchesKubernetes Discovery
http2boolUse HTTP/2 to upstream (required for gRPC backends)
maxConnsPerHostnumberMaximum simultaneous TCP connections to this destination (0 = unlimited)

How routes reference destinations

Routes don’t connect to backends directly. They reference destinations by ID with a weight:

{
  "forward": {
    "destinations": [
      {"destinationId": "<destination-id>", "weight": 100}
    ]
  }
}

A single route can reference multiple destinations with weights for canary deploys or A/B testing.