Loading…

Fly.io
Global application platform enabling developers to deploy and scale applications with edge computing capabilities.
- 199 posts summarised
- latest
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
From their blog
Latest articles
Logbook - 2022-06-23
Fly.io's June 23, 2022 logbook records a broad set of platform, dashboard, and flyctl updates. It announces YUL (Montreal, QC, Canada), adds Laravel and Laravel Octane detection to fly launch, and improves plain Docker build output when NO_COLOR=1 is set. Backend work optimizes API queries, reduces repeated app-image loads, moves app-discard cleanup into a retryable job, and adds SQL comments to help investigate database data-lock issues. The release also documents diagnostics, makes compliance documents public to prospective customers, and improves fly-proxy’s Rust coverage and PROXYPROTO v2 TLV support. Fixes address fly.toml environment variables, organization deletion, password-reset redirects, app secrets listing, metrics after fly apps move, dashboard errors, malformed SSL TLVs, and overzealous email risk checks.
How to make Rust leak memory (also: how to make it stop)
fly-proxy, a Rust-based proxy, leaked memory because its obsolete custom HoneycombLayer retained child spans under a long-lived parent span. The post follows a request from browser input through DNS, TCP, TLS, HTTP/2, and asynchronous Rust components including an aya-built eBPF program, tokio, hyper, and tracing, before explaining how the leak surfaced. In the custom layer, every closed child span was added to its parent’s collection, so each request consumed a small amount of memory while a high-level async task remained alive. Removing that legacy code fixed the primary problem: memory usage barely exceeded 50MB during a load test, while remaining growth came from queues and latency data retained for processing rather than the identified leak.
Logbook - 2022-06-10
Fly.io’s June 10, 2022 logbook lists platform, dashboard, deployment, and account-management changes for its globally distributed application hosting service. WireGuard peer synchronization now adds only peers whose state changed, while removing a global lock from proxy tracing instrumentation improves TLS handshaking and HTTP parsing under load; the post says these changes should speed userspace features, avoid API timeouts, and reduce response times. Deployments gain build-time secrets through fly deploy’s --build-secret flag, larger rolling-deploy batches that are expected to make multi-region releases 2–5x faster, and restored Turboku webhook redeployment from Heroku. Dashboard updates include intelligent longpolling fallback, visible certificate deletion controls, monitoring links, safer app deletion confirmation, and corrected metrics and coupon visibility, while the Jupyter launcher now requires a credit card after abuse.
Logbook - 2022-06-01
Fly.io’s June 1, 2022 logbook records a week of platform, tooling, documentation, and dashboard changes, with forum community feedback driving several logged updates. The release adds rolling behavior to fly restart, extends fly status --all’s failed-VM visibility from two days to seven, supplies Laravel and Node.js examples, and introduces the first official Terraform provider with Machines API parity. Release commands receive 512MB of swap without increasing normal app RAM, while preview GraphQL endpoints fetch volumes, IPs, and certificates directly by ID to support Terraform imports and stateful tooling. Dashboard work adds Livebook upgrades, clearer billing and typography, individual Machine event tables, and fixes for IPv6 copying, organization-plan changes, cross-tab logout, billing URLs, misleading volume usage, and two-factor input limits.
Logbook - 2022-05-26
The May 26, 2022 changelog records product, reliability, documentation, and web UI changes made while work continued toward the Fly Machines launch. Users can configure proxy protocol v2 headers, while Fly HA Postgres instances become read-only and fail health checks at 90% volume usage, creating time to respond before full disks cause crashes. The GraphQL API now names missing apps directly, API telemetry is more selective, and fixes address certificate and volume deletion errors, region-code mutation, DNS validation context, and delayed organization invitations. Documentation covers the Machines API, its reference and FaaS usage, fly.toml updates, and PlanetScale Portals, while redesigned dashboards, app and organization pages, paid plans, documents, and app-level views update the web interface.
Fly Machines: an API for fast-booting VMs
Fly Machines are virtual machines exposed through a fast REST API, with boot times of about 300ms, intended to support cost-effective standby capacity and scale-to-zero applications. Creation is deliberately separated from starting: it performs a centralized database preflight, reserves host capacity through NATS, records the machine, and prepares the OCI image locally. A later start request goes to the nearest regional API, which sends a direct message to the known host, avoiding database coordination and image pulls; examples cite roughly 10ms locally and 150ms across regions. Processes can exit when idle to leave machines intact for clean restarts, while fly-proxy can start them for incoming HTTP requests. The design trades simplicity for hardware pinning, so capacity or host failures may require fallback machines and redundancy; stopped machines currently incur image-storage charges, such as about $0.15 per month for a 1GB Docker image.
Logbook - 2022-05-13
The May 13, 2022 log records Fly.io changes and fixes from the preceding week, spanning infrastructure capacity, account self-service, API maintenance, documentation, and customer-facing behavior. New servers in syd, iad, and dfw, plus three workers in ord, addressed capacity shortages that had caused provisioning or deployment problems. The API moved to Ruby 3.1, with anticipated performance and security-patch benefits, while an internal Elixir UI guide and clearer app and machine name validation errors aimed to reduce development and debugging friction. Operational work permanently disabled consul-templaterb on fly-proxy nodes and fixed a fly-proxy memory leak, giving those nodes more CPU/RAM headroom; an MTU workaround was intended to improve IPv6 tunnel connectivity, while a larger fix remains. Other fixes covered account-deactivation guidance, personalized support email addresses for paid plans, billing, volume metrics, forum registration, and a minor “X daysago” display error.
I'm All-In on Server-Side SQLite
Ben Johnson argues that SQLite should be considered as the core data and persistence layer for many production full-stack applications, rather than being relegated to unit tests in an n-tier architecture. He attributes this case to cheaper, faster hardware and the fact that most successful applications will never approach terabyte-scale data, making distributed database infrastructure excessive for some workloads. Litestream works alongside standard SQLite by taking control of WAL-mode journaling, capturing WAL updates, replicating them to storage such as S3, and handling checkpoints itself. This preserves ordinary SQLite libraries and transactions while providing a path to restore copies and improve resilience to storage failure; upcoming direct database-to-database replication is also mentioned. The resulting model places data in the application process, where the post reports 10–20 microsecond per-query latency, but it remains aimed at single-node applications and has restore, deployment, and replication-guarantee limitations.
Logbook - 2022-05-05
Fly.io’s 2022-05-05 Logbook reports a broad set of infrastructure, product, security, documentation, and bug-fix updates intended to run customer apps faster and more reliably in VMs close to users worldwide. Remote builders now use regional Docker Hub mirrors, clean unused RUN --mount=type=cache build caches, and perform cleanup at startup and shutdown; the new behavior is default for new builders, while existing builders must be destroyed to receive it. WireGuard gateway improvements address load issues, add regional capacity, and support future redundancy, while another IAD gateway is intended to improve connectivity for customer 6pn networks and CI, especially GitHub Actions. The update also adds API security logging for SOC2, re-enables OpenTelemetry, speeds the proxy build pipeline, changes default persistent volume size from 10GB to 3GB, and ships a dashboard, payment retry feature, VSCode fly.toml validation and documentation changes, alongside GraphQL performance work and fixes for monitoring, invoices, encryption, and Homebrew updates.
Accessibility and Real-time Apps: Clearing Fog and Picking Fruit
This post describes an initial accessibility pass on LiveBeats, a Phoenix LiveView reference app with real-time social features, focused on screen reader users before real-time updates are introduced. It recommends labeling meaningful controls and images with visible text, alt, SVG desc, or aria-label, while hiding decorative imagery with aria-hidden="true" or blank alt attributes. It then explains that semantic HTML such as button, main, nav, and article is preferable to ARIA roles where available, while named regions can improve navigation and orientation. Roles also create behavioral obligations: a role="button" control must support focus and Enter or Space activation, and role="application" can force focus mode, blocking caret-browsing conveniences unless the app supplies comprehensive interaction behavior. The initial work clears foundational accessibility issues, with later work reserved for presenting live changes accessibly.
Logbook - 2022-04-20
Fly.io’s April 20, 2022 logbook combines a recent changelog with an account of how the company produces updates for a distributed platform running apps in VMs on hardware around the world. It records added IAD capacity, backup regions disabled by default, flyctl releases with NuxtJS and RedwoodJS deployment support, and reliability improvements to postgres operations, failover handling, error reporting, builders, logs, and releases. The post says commits and status updates often fail to capture completed user-relevant work or its impact. It therefore asks engineers to write updates that explain both what changed and why it matters. Collection is automated through a Slack bot and an app that collates entries into feeds, while the team plans to cultivate stronger changelog habits.
A Foolish Consistency: Consul at Fly.io
Fly.io’s global application platform uses Consul as a service-discovery catalog, but the post argues that a single globally consistent store is a poor fit for every part of the system. Consul Servers run Raft, while lightweight agents register events; fly-proxy consumes generated JSON describing service instances, and separate data tracks network distance. Because load and health are volatile, Fly.io moved load gossip to NATS and lets fly-proxy generate and distribute health hints, while Consul remains useful for orchestration and status. Strong consistency remains important for DNS, where stale or missing addresses can break ordinary applications; the proposed remedy is optional internal Anycast, routing internal traffic through fly-proxy. The conclusion is qualified: Consul is easy to deploy and valuable for infrastructure configuration, but Fly.io’s trajectory is away from using it as the backing store for a global app platform.
Accessibility for real-time web apps
Accessibility for real-time web apps argues that accessibility should be treated as an ongoing design and engineering process rather than a late checklist, using blind developer Nolan Darilek’s experience to frame the subject. It explains why reducing interaction barriers benefits everyone, why disability can be temporary or acquired with age, and why teams should plan for access needs from the beginning. Recommended practices include automated checks such as Deque’s Axe DevTools, live audits, testing with people who have specific access needs, and hiring people with disabilities without making one employee solely responsible. The post then identifies Phoenix LiveView challenges in LiveBeats: dynamically loaded routes need transition announcements, live regions need careful updates, and dropdowns and modals require keyboard-accessibility work.
Our User-Mode WireGuard Year
Fly.io’s flyctl needed to let users SSH into Firecracker VMs and reach private 6PN networks without requiring root access or system-level WireGuard configuration. The solution runs wireguard-go, a userland TCP/IP stack derived from gVisor’s Go implementation, and golang.org/x/crypto/ssh inside flyctl, later coordinating sessions through a cross-platform background agent. The design initially exposed serious operational and usability problems: concurrent sessions displaced one another, agent behavior was fragile, and remote peer creation was slow, while deploys and remote builds expanded the mechanism’s role. The team improved concurrency, Windows support, DNS resolution, configuration handling, and peer-creation latency, and built an unmerged WebSocket path for networks blocking WireGuard’s UDP transport. The author concludes that the complexity was costly early in 2021 but enabled capabilities such as private DNS lookup and ping.
Turbocharge your Heroku Apps with New Turboku
New Turboku clones a Heroku app on Fly.io without requiring data migration, while the resulting app should be able to use services such as Heroku Postgres or Redis through transferred environment variables. The rebuilt workflow integrates flyctl with Fly.io’s remote builders instead of AWS CodeBuild: it queries Heroku, selects a region, converts config variables to secrets, and generates fly.toml, an ephemeral Dockerfile, and a reconstituted Procfile from the slug and process map. A Phoenix LiveView web launcher wraps the deployment by starting a Fly.io Machine running flyctl, while the CLI is available through flyctl turboku. The launcher also configures webhooks and watches environment-variable changes for automatic updates, whereas the CLI lacks webhook integration; the source reports about one millisecond of added database latency for a US-based app.
LiveBeats: Building a social music app with Phoenix LiveView
LiveBeats is an open-source social music application built as a full-stack Phoenix reference app and learning test bed for LiveView features. It demonstrates a shared real-time UI for playlist playback, presence, GitHub OAuth, and concurrent MP3 uploads, using Phoenix PubSub and the existing LiveView WebSocket connection rather than separate REST, JSON, or polling layers. Uploads are processed concurrently in temporary files to verify MP3 validity and enforce a duration below 20 minutes, while HEEx function components and slots provide reusable UI and JS commands keep immediate interactions such as modal hiding on the client. The application runs across five continents with automatic clustering, file proxying, and regional Postgres read replicas; the post presents this as a way to deliver responsive global behavior with relatively minor changes.
Free Postgres Databases
Fly.io announces that Postgres is now available at no cost for small projects, addressing the storage cost that has kept persistent data out of its existing free tier. The offering adds 3GB of persistent volume space through LVM block devices as small as 1GB, alongside the free VM and RAM allowance. Production deployments use intentional two-node Postgres clusters with data on two isolated NVMe drives and volume snapshots, while a free setup begins as a single Development node and becomes a leader-replica cluster when scaled. The volumes are not limited to Postgres: applications can mount up to 3GB for SQLite or other uses. A credit card is still required for free services, which the post says helps deter cryptocurrency-mining abuse of free VMs.
Self-service account deactivation: why it’s harder than you would think
Fly.io introduces a self-service UI for deactivating accounts, replacing the previous requirement to email support. The difficulty is preventing a “delete everything” action from accidentally destroying infrastructure, because users may own apps, share organizations, and administer shared applications. The workflow first addresses app deletion and resource cleanup, then points migrating users toward certificate and DNS changes, while reminding organization administrators to delete or transfer organizations. Rather than embedding every task in one action, the UI guides users to the relevant pages and usually requires deleting only the apps they own. Automatic deactivation still cannot handle accounts involved in shared organizations or organizations administered for others; those cases require help, and the UI identifies the blocking organization step.
Launching Livebook using LiveView
Fly.io’s Livebook launcher uses a single LiveView process to deploy a Livebook instance, but temporarily held deployment secrets could be lost when a user refreshed the browser or the server restarted. The secrets, including liveview_password, were sent to deployment and stored in Vault, so the values could not be retrieved; keeping them in a database or Redis also conflicted with avoiding persistent server-side storage. The implementation encrypts the private state with Phoenix.Token.encrypt/4, stores the resulting blob in browser SessionStorage, and uses LiveView hooks and websocket events to restore it through Phoenix.Token.decrypt/4. After recovery, the UI resumes tracking deployment progress, then clears the cached data when deployment succeeds or fails, while closing the tab also clears SessionStorage.
How Safari Ruined My Tuesday
Safari 15 introduced an obscure CSS bug that made pointer-events: none persist in LiveView applications. LiveView uses connected and disconnected modes, and its default app.css had included .phx-disconnected * { pointer-events: none; } to disable interaction while disconnected. In Safari 15, the rule could remain effective after reconnection or class changes, leaving links and buttons unresponsive even though the web inspector reported pointer-events: auto. The workaround removes pointer-events: none from app.css, although LiveView already ignores clicks on Phoenix links and buttons while disconnected; LiveView 0.17 instead uses a different disconnected-state class. The change avoids applying the faulty rule from existing user-land CSS while retaining custom loading-state styling, and the post says a Safari Development Preview build might fix the underlying bug.
Topics they write about
All topics →Weekly digest
The best engineering reads, once a week.