# Reference: runtime type proxy

URL: https://scalws.com/docs/reference/runtime-proxy/
Source: `docs/reference/schema` in the ScalWS repository

<h3 id="tenants-.applications-.routes-.runtime.proxy.backends"><code>tenants[].applications[].routes[].runtime&lt;proxy&gt;.backends</code></h3>

| | |
|---|---|
| Syntax | `backends: [{...}, ...]` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime (type: proxy)` |
| Reload | applies on reload |

Weighted split per request across pools (alternative to `upstream`).


<h3 id="tenants-.applications-.routes-.runtime.proxy.backends-.pool"><code>tenants[].applications[].routes[].runtime&lt;proxy&gt;.backends[].pool</code></h3>

| | |
|---|---|
| Syntax | `pool: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime<proxy>.backends[]` |
| Reload | applies on reload |

Name of a pool in `upstreams`; alternative to `status`.


<h3 id="tenants-.applications-.routes-.runtime.proxy.backends-.status"><code>tenants[].applications[].routes[].runtime&lt;proxy&gt;.backends[].status</code></h3>

| | |
|---|---|
| Syntax | `status: <integer>` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime<proxy>.backends[]` |
| Reload | applies on reload |

Answers this share of the requests with this status (500-599) instead of sending them to a pool.


<h3 id="tenants-.applications-.routes-.runtime.proxy.backends-.weight"><code>tenants[].applications[].routes[].runtime&lt;proxy&gt;.backends[].weight</code></h3>

| | |
|---|---|
| Syntax | `weight: <integer>` |
| Default | `1` |
| Context | `tenants[].applications[].routes[].runtime<proxy>.backends[]` |
| Reload | applies on reload |

Share of requests (0..=1000); 0 sends none.


<h3 id="tenants-.applications-.routes-.runtime.proxy.client"><code>tenants[].applications[].routes[].runtime&lt;proxy&gt;.client</code></h3>

| | |
|---|---|
| Syntax | `client: hyper \| experimental` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime (type: proxy)` |
| Reload | applies on reload |

HTTP/1 client used towards this upstream; unset: `server.upstream_client`.


<h3 id="tenants-.applications-.routes-.runtime.proxy.connect_timeout"><code>tenants[].applications[].routes[].runtime&lt;proxy&gt;.connect_timeout</code></h3>

| | |
|---|---|
| Syntax | `connect_timeout: <duration> (e.g. 30s)` |
| Default | `5s` |
| Context | `tenants[].applications[].routes[].runtime (type: proxy)` |
| Reload | applies on reload |

Time to establish a connection to the upstream.


<h3 id="tenants-.applications-.routes-.runtime.proxy.preserve_host"><code>tenants[].applications[].routes[].runtime&lt;proxy&gt;.preserve_host</code></h3>

| | |
|---|---|
| Syntax | `preserve_host: true \| false` |
| Default | `true` |
| Context | `tenants[].applications[].routes[].runtime (type: proxy)` |
| Reload | applies on reload |

Forward the client's Host header (default) instead of the upstream authority.


<h3 id="tenants-.applications-.routes-.runtime.proxy.response_timeout"><code>tenants[].applications[].routes[].runtime&lt;proxy&gt;.response_timeout</code></h3>

| | |
|---|---|
| Syntax | `response_timeout: <duration> (e.g. 30s)` |
| Default | `60s` |
| Context | `tenants[].applications[].routes[].runtime (type: proxy)` |
| Reload | applies on reload |

Time allowed for the upstream to return response headers.


<h3 id="tenants-.applications-.routes-.runtime.proxy.tls_ca_file"><code>tenants[].applications[].routes[].runtime&lt;proxy&gt;.tls_ca_file</code></h3>

| | |
|---|---|
| Syntax | `tls_ca_file: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime (type: proxy)` |
| Reload | applies on reload |

Extra CA bundle (PEM) trusted for `https://` upstreams, in addition to the system roots.


<h3 id="tenants-.applications-.routes-.runtime.proxy.upstream"><code>tenants[].applications[].routes[].runtime&lt;proxy&gt;.upstream</code></h3>

| | |
|---|---|
| Syntax | `upstream: <string> \| {...}` |
| Default | `none` |
| Context | `tenants[].applications[].routes[].runtime (type: proxy)` |
| Reload | applies on reload |

`http://host:port`, `https://host:port` or `unix:/absolute/path.sock` (one address, no retries), or `{pool: name}`: a pool from `upstreams`.


<h3 id="tenants-.applications-.routes-.runtime.proxy.upstream.pool"><code>tenants[].applications[].routes[].runtime&lt;proxy&gt;.upstream.pool</code></h3>

| | |
|---|---|
| Syntax | `pool: <string>` |
| Default | `required` |
| Context | `tenants[].applications[].routes[].runtime<proxy>.upstream` |
| Reload | applies on reload |

Name of a pool in `upstreams`.


<h3 id="tenants-.applications-.routes-.runtime.proxy.websocket"><code>tenants[].applications[].routes[].runtime&lt;proxy&gt;.websocket</code></h3>

| | |
|---|---|
| Syntax | `websocket: true \| false` |
| Default | `true` |
| Context | `tenants[].applications[].routes[].runtime (type: proxy)` |
| Reload | applies on reload |

Allow WebSocket upgrades to be tunnelled to this upstream.


<h3 id="tenants-.applications-.runtime.proxy.backends"><code>tenants[].applications[].runtime&lt;proxy&gt;.backends</code></h3>

| | |
|---|---|
| Syntax | `backends: [{...}, ...]` |
| Default | `none` |
| Context | `tenants[].applications[].runtime (type: proxy)` |
| Reload | applies on reload |

Weighted split per request across pools (alternative to `upstream`).


<h3 id="tenants-.applications-.runtime.proxy.backends-.pool"><code>tenants[].applications[].runtime&lt;proxy&gt;.backends[].pool</code></h3>

| | |
|---|---|
| Syntax | `pool: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].runtime<proxy>.backends[]` |
| Reload | applies on reload |

Name of a pool in `upstreams`; alternative to `status`.


<h3 id="tenants-.applications-.runtime.proxy.backends-.status"><code>tenants[].applications[].runtime&lt;proxy&gt;.backends[].status</code></h3>

| | |
|---|---|
| Syntax | `status: <integer>` |
| Default | `none` |
| Context | `tenants[].applications[].runtime<proxy>.backends[]` |
| Reload | applies on reload |

Answers this share of the requests with this status (500-599) instead of sending them to a pool.


<h3 id="tenants-.applications-.runtime.proxy.backends-.weight"><code>tenants[].applications[].runtime&lt;proxy&gt;.backends[].weight</code></h3>

| | |
|---|---|
| Syntax | `weight: <integer>` |
| Default | `1` |
| Context | `tenants[].applications[].runtime<proxy>.backends[]` |
| Reload | applies on reload |

Share of requests (0..=1000); 0 sends none.


<h3 id="tenants-.applications-.runtime.proxy.client"><code>tenants[].applications[].runtime&lt;proxy&gt;.client</code></h3>

| | |
|---|---|
| Syntax | `client: hyper \| experimental` |
| Default | `none` |
| Context | `tenants[].applications[].runtime (type: proxy)` |
| Reload | applies on reload |

HTTP/1 client used towards this upstream; unset: `server.upstream_client`.


<h3 id="tenants-.applications-.runtime.proxy.connect_timeout"><code>tenants[].applications[].runtime&lt;proxy&gt;.connect_timeout</code></h3>

| | |
|---|---|
| Syntax | `connect_timeout: <duration> (e.g. 30s)` |
| Default | `5s` |
| Context | `tenants[].applications[].runtime (type: proxy)` |
| Reload | applies on reload |

Time to establish a connection to the upstream.


<h3 id="tenants-.applications-.runtime.proxy.preserve_host"><code>tenants[].applications[].runtime&lt;proxy&gt;.preserve_host</code></h3>

| | |
|---|---|
| Syntax | `preserve_host: true \| false` |
| Default | `true` |
| Context | `tenants[].applications[].runtime (type: proxy)` |
| Reload | applies on reload |

Forward the client's Host header (default) instead of the upstream authority.


<h3 id="tenants-.applications-.runtime.proxy.response_timeout"><code>tenants[].applications[].runtime&lt;proxy&gt;.response_timeout</code></h3>

| | |
|---|---|
| Syntax | `response_timeout: <duration> (e.g. 30s)` |
| Default | `60s` |
| Context | `tenants[].applications[].runtime (type: proxy)` |
| Reload | applies on reload |

Time allowed for the upstream to return response headers.


<h3 id="tenants-.applications-.runtime.proxy.tls_ca_file"><code>tenants[].applications[].runtime&lt;proxy&gt;.tls_ca_file</code></h3>

| | |
|---|---|
| Syntax | `tls_ca_file: <string>` |
| Default | `none` |
| Context | `tenants[].applications[].runtime (type: proxy)` |
| Reload | applies on reload |

Extra CA bundle (PEM) trusted for `https://` upstreams, in addition to the system roots.


<h3 id="tenants-.applications-.runtime.proxy.upstream"><code>tenants[].applications[].runtime&lt;proxy&gt;.upstream</code></h3>

| | |
|---|---|
| Syntax | `upstream: <string> \| {...}` |
| Default | `none` |
| Context | `tenants[].applications[].runtime (type: proxy)` |
| Reload | applies on reload |

`http://host:port`, `https://host:port` or `unix:/absolute/path.sock` (one address, no retries), or `{pool: name}`: a pool from `upstreams`.


<h3 id="tenants-.applications-.runtime.proxy.upstream.pool"><code>tenants[].applications[].runtime&lt;proxy&gt;.upstream.pool</code></h3>

| | |
|---|---|
| Syntax | `pool: <string>` |
| Default | `required` |
| Context | `tenants[].applications[].runtime<proxy>.upstream` |
| Reload | applies on reload |

Name of a pool in `upstreams`.


<h3 id="tenants-.applications-.runtime.proxy.websocket"><code>tenants[].applications[].runtime&lt;proxy&gt;.websocket</code></h3>

| | |
|---|---|
| Syntax | `websocket: true \| false` |
| Default | `true` |
| Context | `tenants[].applications[].runtime (type: proxy)` |
| Reload | applies on reload |

Allow WebSocket upgrades to be tunnelled to this upstream.
