Contents
Origin settings
Origin fetch is how a node gets content from your origin server.
Basics
In the site's origin settings you can configure:
- Origin protocol and port: HTTP or HTTPS, and the port the origin listens on. The defaults for new sites are set by the administrator under Global Settings › Default Settings.
- Origin port follows visitor port: when on, a visit to port 8080 is fetched from the origin's port 8080, so one configuration can proxy several ports.
Several origins
The origin set has one address per line, with weight and status, and the whole table is saved together. More origins spread the fetch traffic, and if one fails the others take over. Distribution can be:
- Round robin (a higher weight gets more requests)
- Least connections
- Random
- IP hash: the same visitor always goes to the same origin
- URL hash
Tip If you need session stickiness (login state lives in one origin's memory), choose "IP hash".
Advanced
- Slice fetch: when on, all requests are fetched from the origin in 1 MB slices and cached by slice; suited to large downloads and video on demand.
- Real-time data receiving: the node passes data to the visitor as soon as it arrives from the origin without filling a buffer first; suited to streaming output.
- Fail over to another origin: on connection errors, timeouts and so on, the next origin is tried.
Caution A wrong address makes origin fetch fail for the site, so check protocol and port before saving. If the origin only allows node IPs, add all node IPs to the origin firewall, and update it whenever a node is added.
When fetches are slow or failing, first check in the attack log and the access logs whether requests reach the node at all.