# Platform Federation

---

{{% include file="common-pages/platform-federation.md" %}}

## Key Capabilities

- **Manage once, apply everywhere**: Automate global administration across all distributed sites and eliminate manual overhead
- **Repository provisioning**: Map the global stages to sites once. Repositories are provisioned automatically on every site mapped to their stage
- **Zero configuration drift**: Monitor the federation in real time and reconcile drift as soon as it appears

## What Gets Synced

- **Global Entities**: Platform entities and configurations, including Projects, stages and roles, access control and policies
- **Repositories**: Repositories are provisioned on the member sites from the main site, according to the Stage to Site mapping:
  - **Local repositories**: Configuration and artifacts are federated. The artifacts are kept in sync using Federated Repositories
  - **Remote and virtual repositories**: Configuration only is federated
- **Curation policies**: Already supported as part of [Curation Federation](https://docs.jfrog.com/administration/docs/curation-federation), currently as a standalone solution. Curation Federation is planned to be included in Platform Federation

## Architecture

Global Entities are synced directly between all member sites as equal peers. Repositories are provisioned from the main site.

```mermaid
flowchart LR
    A["JFrog SaaS<br/>Main Site"]
    B["JFrog SaaS<br/>Site B"]
    C["JFrog SaaS<br/>Site C"]
    A <-- "Global Entities" --> B
    B <-- "Global Entities" --> C
    A <-- "Global Entities" --> C
    A -. "Repository provisioning" .-> B
    A -. "Repository provisioning" .-> C
```

- The Platform Federation is managed from the main site. Global Entities sync does not depend on the main site, so it is not a single point of failure for mission critical operations
- If a site goes offline, the other sites keep syncing. The offline site catches up automatically when it returns
- Sync events can be monitored from the platform UI and the REST API of the main site

{{% include file="common-pages/platform-federation-guidelines.md" %}}

## Implementation Guidelines

- **Prerequisites**: Enterprise+ subscription with the Platform Federation entitlement, and all sites live and in the same Circle of Trust
- **Align before joining**: When a Platform Federation is created, or a site is added to it, the most recent value of each Global Entity is applied to all member sites. Overwritten values cannot be restored, so align the configuration of the sites in advance
- **Mesh topology and uniform configuration**: All member sites sync with each other as peers, and all Global Entities are synced to all of them, with no filtering or mapping per site. Star and chained topologies still require [Access Federation](https://docs.jfrog.com/administration/docs/access-federation)
- **One Platform Federation per site**: A site can be a member of only one Platform Federation
- **Existing federation**: Federated Repositories and [Curation Federation](https://docs.jfrog.com/administration/docs/curation-federation) keep working on sites that join a Platform Federation
- **Impact of removing a site**: A removed site keeps the last synced configuration, and stops sending and receiving updates
