Petsem: Sometimes Dead Is Better
Fly.io replaced HashiCorp Vault with Petsem, a home-grown secrets store that keeps a single write master in IAD but adds regional read replicas, trading strict consistency for availability. The change cut p99 secret-load time on app boot from 10s to 300ms and removed a single-region dependency, avoiding an enterprise multi-region Vault license costing roughly an engineer's salary per year. Macaroon third-party discharge tokens restrict secret reads to workers actually hosting the app, so a compromised host can only reach secrets for apps placed on it, and denied reads trigger alerts. The migration ran dual-write and side-by-side from 2024 to a July 2025 cutover, and Fly KMS builds on Petsem to offer encrypt, decrypt, sign and verify operations without the secret ever leaving the store.
Related posts
- Skip the API, Ship Your Database
Fly.io mediumAdeptInstead of designing an API for internal services, Fly.io ships them a read-only SQLite replica via LiteFS, letting consumers query and join data with plain SQL. The pattern emerged from running Corrosion, Fly's gossip-based state store, on LiteFS, where a one-way replica avoided chatty gossip and needed only a small static-lease config. It moves query compute onto each client, which removes rate limiting and multi-tenant resource contention. The tradeoffs are that writes still need an API, the schema becomes a looser contract (mitigated with backward-compatible changes and views), and access control requires per-tenant databases.
- Session revocations at scale
Canva Engineering mediumAdeptCanva moved its gateway session-revocation cache from per-pod MySQL loads to sorted binary chunks in S3, eliminating the database stampede when hundreds of gateway pods started during deploys. Revocations are packed into 16-byte records in sorted flat arrays split into 30-minute S3 objects. Gateways binary-search the downloaded bytes directly and refresh recent chunks with conditional GETs. A ZooKeeper-elected worker appends new revocations, using conditional PUTs for optimistic concurrency so that racing writers never lose updates. The theoretically O(N^2) rebuild still exceeds 2000 revocations/sec, memory use dropped 87.5%, and read replicas were cut to two.
- How Cedalio uses Neon for an efficient development workflow
Neon easyNovice
Cedalio, an ESG data verification startup, moved from DynamoDB to Postgres and picked Neon over RDS for a simpler API and console. GitHub Actions creates a Neon database branch and a Fly.io app instance for each PR, then deletes both after merge, and scale-to-zero keeps these temporary environments cheap. A one-database-per-customer design gives tenant isolation. Their backend reads the Postgres WAL, bundles and encrypts operations, stores them optionally on IPFS or Arweave, and commits a hash to a client-owned smart contract for tamper-evident auditing.
- How Hugging Face Scaled Secrets Management for AI Infrastructure
Hugging Face mediumAdeptHugging Face moved secrets management to Infisical as its infrastructure grew from AWS-only to multi-cloud (Azure, GCP), choosing it over HashiCorp Vault for developer workflows and multi-cloud abstraction. In Kubernetes, the Infisical Operator syncs secrets via an InfisicalSecret CRD into native Kubernetes secrets and can auto-reload Deployments. Engineers still prefer manual redeploys for control at over 10 million requests per minute. RBAC is mapped from Okta groups, the CLI replaces local .env files, and CI/CD uses GitHub Actions with OIDC, Terraform and self-hosted runners.
- Staying Evergreen: How we automated secure access and repo hygiene in a shared org
GitHub Engineering mediumAdeptEvergreen is a Go-based GitHub App that automates quarterly outside-collaborator access reviews and stale-repo archival in a shared org of 1,400+ GitHub employees, customers and partners, built entirely from native primitives: scheduled Actions firing repository_dispatch, webhooks, issue checklists, custom properties, and per-repo JSON state files in git that double as the audit trail. It fails secure by revoking all access when a review goes unanswered, fails closed by keeping reviews pending until every removal succeeds, and never deletes anything. Rollout relied on a DRY_RUN mode, logfmt logs in Splunk, and proactive pacing to stay under GitHub's secondary content-creation rate limits of 80 requests/minute and 500/hour.