Fly.io's secret-store Vault was a single-region Raft cluster, causing long reads during app boot.
The latency and hard dependency on the IAD region hurt performance and reliability at scale.
The team solved it by: 👉 Built Petsem with read replicas in multiple regions. 👉 Added macaroons discharge tokens to bind workers to app-specific secrets. 👉 Migrated writes to both stores, then cut over to Petsem as the primary reader.
The parts that matter: 1️⃣ Petsem - home-grown Vault replacement that serves read replicas globally 2️⃣ macaroons - require a third-party discharge token to prove worker-app placement
p99 secret read latency dropped from 10 seconds to 300 ms, removing the single-region boot dependency.
Petsem still relies on a single write master in IAD, so writes remain a latency hotspot. Building and maintaining a custom store added engineering cost, and Vault remains in use for other authority functions.
How do you balance custom secret-store performance gains against the operational overhead of running your own authority layer?