# Fly.io cuts reported secrets-read tail latency by moving reads closer to workloads

A November 20 engineering retrospective explains why Fly.io traded strong read consistency for regional availability and workload-specific authorisation in its internal secrets service.

The migration finished in July 2025, but the newly published architecture offers a useful lesson for distributed hosting operators: secret retrieval can dominate startup latency, and replication changes revocation assumptions.

- Status: Active
- Published: 2026-11-28T08:02:34+13:00
- Updated: 2026-11-28T08:02:34+13:00
- Categories: Cloud & Infrastructure, Hosting, Deployment & DevOps
- Tags: distributed systems, Fly.io, secrets management
- Canonical HTML: https://beyondthe.news/dossiers/flyio-petsem-regional-secrets-replication

## What changed

Fly.io published an engineering retrospective on November 20, 2026 describing Petsem, its internal replacement for Vault on the customer-secret retrieval path. The company reports p99 retrieval falling from ten seconds to 300 milliseconds. Migration began in March 2024 and final cutover occurred in July 2025; this is a newly disclosed architecture, not a new customer product launch.

## Why it matters

A globally distributed application can still depend on one distant region when starting. Separating local reads from central writes can reduce startup delays, but teams must explicitly decide how much credential staleness is acceptable and how to constrain access when a host is compromised.

## Availability versus consistency

Fly.io retains a central writer in IAD but distributes read replicas. The company accepted potentially stale reads rather than requiring every startup to contact its original central Vault deployment. The reported latency improvement is internal and does not establish a general benchmark for Vault or other secrets managers.

## Authorisation follows placement

The design requires both worker credentials and a separate authorisation attestation tied to application placement. This reduces the scope of secret access available to a compromised worker. It does not prevent extraction of credentials already present in guest memory.

## Migration and operational boundaries

The company used dual writes, backfilled existing data and ran the systems alongside each other before switching the read path. Vault remains in use elsewhere. The retrospective does not quantify replication lag, revocation propagation or behaviour during prolonged partitions.

## Key details

- Engineering disclosure dated November 20, 2026.
- Final customer-secret read cutover occurred in July 2025.
- Reported p99 retrieval latency: 10 seconds before, 300 milliseconds after.
- Central writer remains; regional read replicas permit stale reads.
- Performance and security outcomes are first-party claims.

## Builder takeaways

- Measure secret retrieval separately from total application startup time.
- Define rotation and revocation freshness requirements before adopting asynchronous replication.
- Scope secret authorisation to workload placement rather than granting fleet-wide access.
- Use staged migration and compare old and new read paths before cutover.

## What to watch

- Published replication lag and partition recovery measurements.
- Further evidence on revocation propagation and authorisation failures.
- Independent operational measurements or reusable implementation details.

## Uncertainties

- No independent benchmark or security audit is established here.
- Replication lag and recovery bounds are not quantified in the retrospective.
- No generally available Petsem product or pricing is established.

## Sources

- [Petsem: Sometimes Dead Is Better](https://fly.io/blog/petsem/) — Fly.io · primary · 2026-11-20T00:00:00+13:00. First-party engineering retrospective; architecture, migration dates, internal latency and threat-model limitations.

