Master & Thin Clients
On this page 3 sections
In any cluster of two or more nodes, exactly one node is the master. The rest are thin clients. This is not a database leader-election in the traditional sense, there is no consensus protocol, no quorum, no Raft term. The master holds the real backend addresses for the cluster's origins. One other member can be elected as Fallback in the Control Panel. It operates as a replica until automatic promotion is approved after master failure.
What each role does
| Master | Thin client | |
|---|---|---|
| Origin backend | Real address (e.g. 127.0.0.1:80) | Pre-rewritten to <master>:8080 |
| Reaches origin? | Yes, direct | No, through master |
| Caches? | Yes | Yes, independently |
| HEADLESS triggers when… | Origin fails | Master fails |
| Number per cluster | Exactly one | Zero or more |
Why this design
Treating only the master as having "real" upstream connectivity means thin clients can be placed anywhere, a far region, a partner's network, a small embedded device, without needing direct line-of-sight to the origin web server. The master is the single point that talks to the origin, and the thin clients form a transparent fan-out around it.
Three concrete benefits fall out of this design:
- Latency. Each thin client serves its region's traffic from a local cache. Users in that region get cache hits without ever crossing to the master, which is often on a different continent.
- Security. The only network port the thin client needs open to the world is its own public port (typically fronted by your TLS terminator). Replication, cache pulls, and control-plane sync between thin and master all flow over a single encrypted port, the same port that serves end users. There is no separate "replication port" to firewall, no admin channel to secure separately. Smaller surface area, fewer rules to forget.
- Simplicity. No shared database, no quorum service, no message broker. Adding capacity is "install the package, subscribe, restart", that is the entire runbook.
Each thin client maintains its own cache for the master. If the master itself becomes unreachable, the thin client serves HEADLESS responses locally from that cache. This cache protection covers the failure-detection and configuration-convergence interval during automatic failover, and remains useful when there is no eligible Fallback. The two cache protection paths are:
Promoting a different node to master
For a planned change, open Infrastructure, choose Manage on the domain, then Master & Fallback. Select the Master role and the intended member, then save. Running members receive and apply the new configuration automatically.
For automatic recovery, use the same dialog to elect a different member as Fallback. Once its configuration has applied, it automatically requests promotion after sustained master failure. The control plane must confirm the old master's lease has expired and its QSCS port is unreachable before approving the change. No manual promotion or routine re-subscription is needed. See master and fallback election for the full sequence.
After automatic promotion, the new master uses the real backend addresses and other nodes adopt it as their upstream. An origin-only outage does not by itself trigger master failover.
127.0.0.1:80 needs a working application on each candidate host. QSCS replicates eligible cached content, not your application database or files. A promoted node without a working backend cannot fetch fresh content.