Fly.ioProblem & solution
Rethinking Serverless with FLAME
Summary
Rethinking Serverless with FLAME presents a pattern for running selected application functions on short-lived copies of the full app instead of moving code into bespoke FaaS services. FLAME, short for Fleeting Lambda Application for Modular Execution, uses FLAME.call to send a function and closed-over values to a runner pool, while retaining access to the application’s database connections and other code. The Elixir flame library includes LocalBackend and FlyBackend adapters, and Fly.io can boot a same-image Machine in the parent’s region in about three seconds. Runners may stay warm, scale to zero, or grow elastically based on configuration. The post also describes process-based streaming with LiveView and supervision and monitoring mechanisms for transient runners.
Context
The post argues that conventional FaaS addresses elastic scaling by introducing queues, storage, glue code, bespoke runtimes, timeouts, and additional development and testing complexity. It also identifies a limitation in scaling whole web servers for CPU-bound work such as video transcoding or machine-learning tasks.
Approach / What changed
FLAME treats the entire application as a lambda and runs modular functions on temporary copies of that application. The Elixir flame library provides runner pools and backend adapters, including LocalBackend and FlyBackend; runners connect to a parent node, execute received functions, return results, and can idle down or be shut down safely.
Takeaways
FLAME.call runs a supplied function in a new or existing runner copy, automatically passing variables captured by the function, such as a Video struct and an interval.
The FlyBackend uses the current packaged Docker image to boot a Fly.io Machine in the parent’s region; the post reports startup within about three seconds.
Elixir process and node monitoring, supervision, and controlled application shutdown support runner cleanup, active-work handling, and graceful shutdown during deployments.
Source and freshness
- Source
- fly.io
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
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.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.