Origin / Upstream — origin servers & load balancing
Origin / Upstream declares the origin server(s) VNIS fetches content from on a cache MISS. You can declare multiple origins and choose how to load balance between them, enable health checks to automatically remove dead origins, use a circuit breaker to temporarily cut off failing origins, configure TLS to the origin (including mTLS), or point to a private S3 bucket.
Use this when: you want to spread load across several backends, increase fault tolerance, or use S3 as the origin. Example: your shop has 3 backend servers — declare all 3, choose round_robin, and enable an http health check so VNIS automatically stops sending traffic to any server that is failing.
Before you start
- The domain has been added and points to VNIS.
- You have the origin address(es) in the form
http(s)://. The origin must not be an internal/loopback IP (SSRF protection).
How to configure
- Go to Domains → select the domain → Upstream tab.

- Choose the origin type: HTTP (default) or S3.
- For HTTP: enter at least one Origin Server (URL). If you have several origins, set the Weight and choose a Load Balancer (selector).
- (Optional) Open Health Check, choose
tcp/http, and set the Interval; open Circuit Breaker, TLS to Origin, Origin Shield, and Retry policy if needed. - Click Save and wait a few seconds for the sync.
Configuration fields
Origin & load balancing:
| Field | Meaning | Values | Default | Notes |
|---|---|---|---|---|
| Origin Servers (URL list) | List of origin servers | ≤64 URLs, each URL ≤2048 characters, http(s):// | — | At least 1 required; private/loopback addresses are blocked |
| Weight | Load distribution weight (WRR) | 1–1000 (number of entries = number of URLs) | — | Sent only when the selector is weighted_round_robin or failover; with failover, priority follows the position in the list, not the weight |
| Load Balancer (selector) | Origin selection algorithm | round_robin, weighted_round_robin, random, least_connections, ip_hash, consistent_hash, failover | round_robin | random/ip_hash/consistent_hash/least_connections ignore the weight |
| Protocol | Protocol to the origin | h1.1, h2, h2h1 | h1.1 | h2/h2h1 are negotiated only over TLS; on http:// they fall back to H1 automatically |
| Max Retries | Number of retries per request | 0–10 | 2 | — |
| Connection Pool Size | (intended) keepalive pool size | Read only | 256 | Display only — this value cannot be changed per domain |
Health check & Circuit breaker:
| Field | Meaning | Values | Default | Notes |
|---|---|---|---|---|
| Health Check Type | Type of active health check | none, tcp, http | none | Only tcp/http probe and drive the circuit breaker |
| Health Check Interval | Probe interval | 1–3600 seconds | 5 | Lower = faster failure detection, higher probe load |
| Health Check Path | Probe path (when type=http) | Path | /health | Used only when type=http |
| Circuit Breaker | Enables circuit breaking for failing origins | On/off | Off | Works only when Health Check Type ∈ {tcp,http} |
| Failure Threshold | Number of consecutive failed probes to open the circuit | 1–1000 | 5 | — |
| Recovery (secs) | Wait time before trying half-open | 1–3600 seconds | 30 | — |
| Half-Open Probes | Number of probes allowed in the HalfOpen state | Number | 3 | — |
TLS to origin & headers:
| Field | Meaning | Values | Default | Notes |
|---|---|---|---|---|
| TLS to Origin | Enables TLS from edge to origin | On/off | Off | Turning it on with an http:// URL returns error 400 |
| Skip cert verification | Skips origin certificate verification | On/off | Off (verification enabled) | On = MITM risk; shown only when TLS to Origin is on |
| SNI Override | Sets the SNI manually | Hostname (no :, no IP literal, ≤253 characters) | (empty) | Requires TLS to Origin to be on |
| MTLS certificate | Selects the client cert/key pair for mTLS | Certificate in the store | (none) | Shown only when TLS to Origin is on; the referenced certificate is checked for existence — it must already be in the store with its private key, otherwise you get 400 |
| Host Header | Overrides the Host sent to the origin | String | (empty = the request's Host) | — |
| Custom Origin Headers | Fixed headers sent to the origin | ≤50 headers; name is printable ASCII, no :; value has no CR/LF, ≤8192 bytes | — | — |
Origin Shield & Retry:
| Field | Meaning | Values | Default | Notes |
|---|---|---|---|---|
| Shield Address | Intermediate node that reduces origin load | Resolvable host:port | (empty) | MISS requests go through the shield; skipped if it points to the node itself |
| Use TLS (shield) | TLS for the hop to the shield | On/off | Off | — |
| Shield SNI Override | SNI to the shield | Hostname | (empty) | Requires Use TLS (shield) to be on |
| Retry on Status Codes | HTTP codes that trigger a retry | List of codes | — | Empty = no status-based retries |
| Retry on Connect Failure | Retry on TCP connect failure | On/off | On | — |
| Retry on Timeout | Retry when the origin times out | On/off | On | — |
| Retry on Connection Reset | Retry when the origin resets mid-response | On/off | Off | — |
| Prefer IPv4 upstream | Prefer IPv4 when resolving the origin | On/off | Off | Works around cross-carrier IPv6 peering issues |
S3 origin (shown when the S3 type is selected):
| Field | Meaning | Values | Default | Notes |
|---|---|---|---|---|
| Access Key ID | Access key | ≤128 characters | — | Required; partially masked when viewed again |
| Secret Access Key | Secret signing key | ≤256 characters | — | Required; shown as ******** when viewed again, kept unchanged on save |
| Region | SigV4 signing region | ≤64 characters, [a-z0-9-] | us-east-1 | — |
| Bucket Name | Bucket name | ≤255, [a-zA-Z0-9-.] | (empty) | Empty = dynamic bucket taken from the path |
| Addressing Style | Addressing style | virtual_hosted / path | virtual_hosted | MinIO/GCS usually use path |
| Custom Endpoint | Custom endpoint (MinIO/R2…) | ≤512 characters | (empty = AWS) | Private/loopback addresses are blocked |
| Block write methods | Blocks writes at the edge | On/off | On | On = PUT/DELETE/PATCH return 405 |
Configuration examples
Example 1 — 3 backends with round robin load balancing + HTTP health check.
- Origin Servers:
https://be1.example.com,https://be2.example.com,https://be3.example.com· Selector:round_robin· Health Check Type:http· Path:/healthz· Interval:5. - Expected result: traffic is spread evenly across the 3 backends; any backend whose
/healthzprobe keeps failing is temporarily removed. - How to check: stop
be2→ repeatedcurlrequests still return 200 (traffic shifts to be1/be3); start be2 again → it receives traffic again.
Example 2 — Failover: 1 primary origin + 1 backup.
- Origin Servers: put the primary origin at the top of the list (
https://primary.example.com), with the backup origin below it (https://backup.example.com) · Selector:failover· Health Check Type:tcp· Circuit Breaker: on. - Result: traffic goes to the first origin in the list (not yet tried) first; when that origin fails or its circuit opens, traffic moves to the next origin. (Failover order follows the order in the list, not the weight values.)
- How to check: stop the primary origin → requests are still served from the backup; watch the health/circuit state change.
Example 3 — Private, read-only S3 bucket as origin.
- Origin type: S3 · Access Key ID + Secret · Region
ap-southeast-1· Bucketmy-assets· Block write methods: on. - Result: GET/HEAD are automatically SigV4-signed at the edge; PUT/DELETE/PATCH are blocked with 405 right at the edge.
- How to check:
curl https://domain/image.jpg→ 200 (signed and fetched from S3);curl -X PUT https://domain/image.jpg→ 405 with the headerAllow: GET, HEAD, OPTIONS.
The circuit breaker requires an active health check. If you turn on Circuit Breaker but leave Health Check Type = none, the circuit never opens (there are no probes to count failures). Always set the type to tcp or http when using the circuit breaker.
Order of evaluation
- With multiple origins, the edge first filters by health (passive + active), then applies the selector (origin selection algorithm). If all origins are "unhealthy", the edge falls back to using all of them to avoid dropping 100% of traffic.
- An origin-rewrite rule (separate page) can carry its own
host_header/sni_override/selector/retry settings that override the Upstream configuration for matching paths; the rule'shost_headerhas the highest precedence.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Save returns 400 "upstream URL is required" | No origin entered | Enter at least one valid http(s):// URL |
| Save returns 400 when TLS to Origin is on | The list contains an http:// URL | Use https://, or turn off TLS to Origin |
| Save returns 400 for an internal IP origin | The origin points to a private/loopback address | Use a public address |
| Circuit Breaker is on but never trips | Health Check Type = none | Set the type to tcp/http so there are probes |
| Changing the weight does not change the distribution | The selector does not use weights (e.g. random, ip_hash) | Choose weighted_round_robin or failover |
| S3: signature error / 403 from the bucket | Wrong Region/Access Key/Secret/Endpoint | Check the Region and keys again; for MinIO/GCS set Addressing Style = path |
FAQ
- How many origins can I declare? Up to 64 URLs per domain.
- What is the difference between active and passive health checks? Active (
tcp/http) means VNIS probes on a regular schedule; passive means an origin is automatically removed temporarily when its actual error rate exceeds 50%. Passive checks always run; the circuit breaker only works together with active checks. - Is my S3 secret exposed when I view the configuration again? No — when viewed again, the Secret is shown as
********and the Access Key is partially masked; if you save while keeping the placeholder, the old key is kept. - Does
h2to the origin always work? Only with TLS (ALPN is negotiated over TLS). Onhttp://,h2h1automatically falls back to H1. - How long does a change to the origin's DNS record take to apply? The edge caches resolution results for about 60 seconds.