---
title: "Rethinking Serverless with FLAME"
description: "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."
---

# Rethinking Serverless with FLAME

[Fly.io](https://yomu.fyi/company/fly-io) · Dec 6, 2023

**Type:** Problem & solution

## 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.

**Tags:** [Autoscaling](https://yomu.fyi/topic/autoscaling), [Elixir](https://yomu.fyi/topic/elixir), [Fly.io](https://yomu.fyi/topic/fly-io), [Serverless](https://yomu.fyi/topic/serverless)

- Source: [Fly.io](https://fly.io/blog/rethinking-serverless-with-flame)
- Source URL: https://fly.io/blog/rethinking-serverless-with-flame
- Ingested by Yomu: 2026-09-03T01:26:16.512Z

[Read original post](https://fly.io/blog/rethinking-serverless-with-flame)
