How Origin-Agent-Cluster Enables Process Isolation

The Origin-Agent-Cluster HTTP response header allows web applications to request a dedicated operating system (OS) process and execution context keyed strictly to their specific origin, rather than sharing resources across a broader site. This article explains how modern browser process architectures traditionally group origins, how Origin-Agent-Cluster changes that behavior to achieve OS-level process isolation, the security and performance benefits of this separation, and the trade-offs involved in its deployment.

The Default Browser Process Model: Site vs. Origin

To understand Origin-Agent-Cluster, it is necessary to differentiate between an "origin" and a "site." An origin is defined by the exact combination of scheme, host, and port (e.g., https://sub.example.com:443). A site, often referred to as eTLD+1, is broader and consists of the public suffix plus the domain name (e.g., example.com).

By default, modern browsers implement a security boundary known as Site Isolation. To conserve operating system resources, browsers typically assign OS-level renderer processes at the site level rather than the origin level. Under this default policy, https://app.example.com and https://forum.example.com may share the same operating system process, event loop, and memory space, provided they belong to the same site.

What is an Agent Cluster?

In the HTML specification, an "agent" comprises an execution environment (such as an event loop and JavaScript engine instance), and an "agent cluster" is a collection of agents that can access each other's memory directly.

Under the default site-keyed model:

  • Origins sharing an eTLD+1 belong to the same site-keyed agent cluster.
  • Synchronous access between windows or iframes across these subdomains is theoretically possible if they modify document.domain.
  • Because they share an agent cluster, the browser cannot cleanly allocate them into separate OS processes without risking breaking legacy web behaviors.

How the Origin-Agent-Cluster Header Works

The Origin-Agent-Cluster header uses Structured Header syntax and takes a boolean value:

Origin-Agent-Cluster: ?1

When a server sends this header, it instructs the browser to place the document into an origin-keyed agent cluster instead of a site-keyed one.

Once an origin is placed in an origin-keyed agent cluster:

  1. Severing Cross-Origin Synchronous Scripting: The browser permanently disables the ability to alter document.domain for that origin. Even if two subdomains attempt to relax their domain boundaries via document.domain = 'example.com', the browser rejects synchronous cross-origin object access.
  2. Decoupling the Event Loop: The origin receives an isolated event loop and global memory heap independent of other subdomains.
  3. Triggering OS Process Isolation: Because the browser is guaranteed that synchronous memory access to sibling subdomains will never occur, it can safely spin up a separate OS renderer process exclusively for that origin.

Security Benefits: Hardening Against Speculative Execution

The primary security motivation for origin-level OS process isolation is defense against hardware-level side-channel vulnerabilities, such as Spectre.

While the Same-Origin Policy (SOP) operates logically at the JavaScript layer, microarchitectural attacks can bypass software-based boundaries if two untrusted entities share physical memory and CPU caches within the same process. By forcing the browser to isolate the origin into its own OS process, the application gains the hardware protections enforced by the operating system kernel and CPU MMU (Memory Management Unit). Malicious or compromised code running on https://untrusted.example.com cannot read the address space of https://secure.example.com.

Performance Benefits: Isolated Event Loops

Shared processes create performance contention. Heavy JavaScript computation, complex DOM manipulation, or unoptimized scripts on one subdomain can saturate the single-threaded event loop, leading to jank, dropped frames, and unresponsiveness on unrelated subdomains hosted in the same process.

By using Origin-Agent-Cluster: ?1, high-performance applications (such as web-based audio workstations, complex dashboards, or video editors) guarantee that their main thread and garbage collection cycles remain unimpacted by activities occurring on adjacent subdomains.

Key Considerations and Limitations

  • Process Overhead: Each dedicated OS process introduces memory overhead (typically tens of megabytes per process in Chromium-based browsers). Overusing this header across hundreds of distinct subdomains can strain device memory.
  • Browser Hint Status: The header acts as a strong hint to the browser. While Chromium-based browsers actively use this header to determine process allocation, the browser retains discretion based on available system memory and platform architecture.
  • First-Response Precedence: The process allocation behavior for an origin is established by the first document loaded from that origin in a given browsing context group. To ensure consistent isolation, Origin-Agent-Cluster: ?1 should be configured uniformly across all server responses for that specific origin.