Origin
Applies the origin-hostname definied in the persistent Origin record uniquely identifiy by the filter-value name to this request. THis causes the requested manifest to fetched from Origin.Hostname, rather than the default Bakery origin.
As Origin record consists of:
Name: unique, compact name for use w/ filter, such as “Pplus”Hostname: Fully-Qualified Domain Name of origin-host to use as origin-host/backendDescription: Human-readable description of host, content, etc.
Configuring Origins
There are two ways to register origins for use with the o() filter:
1. Database + Redis (recommended for production)
Origin objects are created and managed by authorized users via the <a href=”/bakery/api/index.html”>Persistence API</a>. Each API write stores the origin in Postgres and simultaneously caches it in Redis. On every manifest request, Bakery reads the origin from Redis first; if Redis has no entry, it falls back to Postgres. This means Bakery continues to serve o() filter requests correctly during a Postgres maintenance window or temporary outage, as long as the origin was previously registered via the API and Redis is available.
2. Environment variable (ORIGINS) — stateless deployments only
For deployments where origins are fixed at deploy time and a database is not available (NODB=true), origins can be defined via the ORIGINS environment variable as a semicolon-separated list of name@hostname pairs:
ORIGINS=”cdn1@https://origin1.example.com;cdn2@https://origin2.example.com”
Origins defined this way are loaded into memory at startup. When ORIGINS is set, all origin lookups are served from this in-memory list — the database and Redis are never consulted, and the Origins Persistence API becomes a no-op. This is appropriate for immutable or stateless deployments where origins are known ahead of time and do not change without a redeployment.
Do not use
ORIGINSfor dynamically managed origins. If origins are created or updated via the Persistence API, use the database + Redis approach instead.
Protocol
| HLS | DASH |
|---|---|
| yes | yes |
Keys
| name | key |
|---|---|
| origin | o() |
Values
| values | example | description |
|---|---|---|
<origin>, i.e. “origin_123” | o(origin_123) | Use the Hostname associated with unique origin name origin_123 as the origin host for this request |
Usage Example
$ http https://bakery.dev.vtg.paramount.tech/o(origin_123)/the_mighty_boosh/S01/E01.mpd
filters/origin.md