Always Available
summary
A Phoenix app called Libra keeps page inspection state in memory and continues serving results when PostgreSQL is down by running a GenServer per inspection that fetches assets, answers queries from its own state, and eventually persists as a backup. Workers register in a local registry and are supervised with a one-for-one supervisor. Each inspection enforces 24-hour self-expiry, retries DB operations with targeted rescue and backoff, and works on a single node; multi-node availability needs replication or a different datastore.
AI-written summary · about
chapters (22)
- 0:00Introduction
- 1:11Backstory
- 2:24Developers
- 3:33Multiple Sources
- 4:00Predictable State
- 4:25Availability
- 5:47Libra
- 6:20Browser
- 10:34Availability Score
- 11:27Database Outage
- 11:41Master Plan
- 14:32Inspector Worker
- 14:47Inspector Worker Responsibilities
- 18:17Benefits
- 19:47Isolation
- 20:19Supervisor
- 23:35Registry
- 26:03Public API
- 28:38Surviving DB outages
- 29:43Try rescue
- 36:08Design for ability
- 36:39Any questions
related talks
15mProtecting Corporate Accounts with LiveView realtime dashboard
40mTaking Off with Phoenix
20mUsing OTP in Your Phoenix App
32mNative-Grade Web Apps with Local-First Data
13mTo Gatsby 4 and Beyond!
40mThe Power & Performance of Phoenix LiveView
30mAbove the Clouds: Investigating Systems from 32,000 ft.
21mParallel Query Running with Gatsby 4
