From d7ad185c572e263af8ecfd44a3cd8fbc4f72bc89 Mon Sep 17 00:00:00 2001 From: Kristin Martin Date: Wed, 14 Oct 2026 20:07:28 +0000 Subject: [PATCH 1/3] Add a scale-to-zero config and idle-cost example to the autostop page Open the page with the complete fly.toml block that fly launch writes, cold start and resume times, and a worked monthly cost for a Machine that runs 2 hours a day, with and without a volume. Part of superfly/docs-tracking#367 --- launch/autostop-autostart.mdx | 44 +++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/launch/autostop-autostart.mdx b/launch/autostop-autostart.mdx index 85fdb0a604..4153dc9235 100644 --- a/launch/autostop-autostart.mdx +++ b/launch/autostop-autostart.mdx @@ -7,6 +7,37 @@ Your app can meet peak demand without keeping extra Machines running. Use autost Get all the details of [how Fly Proxy autostop/autostart works](/reference/fly-proxy-autostop-autostart). +## Scale to zero {#scale-to-zero} + +This `fly.toml` section stops all of your app's Machines when there's no traffic, and starts one again when a request arrives. It's what `fly launch` writes by default. Set `internal_port` to the port your app listens on. + +```toml +[http_service] + internal_port = 8080 + force_https = true + auto_stop_machines = "stop" + auto_start_machines = true + min_machines_running = 0 +``` + +When a request arrives and no Machine is running, Fly Proxy starts a stopped Machine and routes the request to it. A cold start takes about 2 seconds or more for common apps. To wake faster, set `auto_stop_machines = "suspend"`. Resuming a suspended Machine takes a few hundred milliseconds. Check the [suspend requirements and caveats](/reference/suspend-resume) first. + +### What an idle app costs {#what-an-idle-app-costs} + +A stopped or suspended Machine isn't billed for CPU or RAM. You pay only for its root file system (rootfs), at \$0.15/GB for 30 days. A [volume](/volumes) is billed for its full provisioned size whether its Machine is running or not. + +For example, here's a `shared-cpu-1x` Machine with 512MB RAM in Ashburn (`iad`) that serves traffic 2 hours a day and is stopped the rest of the time: + +| Item | Monthly cost | +| - | -: | +| Machine running 2 hours a day (\$3.69/month if it ran all the time) | \$0.31 | +| 1GB rootfs while stopped, 22 hours a day (assumed image size) | \$0.14 | +| **Total without a volume** | **\$0.45** | +| 10GB volume, billed all month | \$1.50 | +| **Total with a volume** | **\$1.95** | + +On a mostly idle app, a volume can cost more than everything else combined. If your app doesn't need a local disk, keep files in object storage such as [Tigris](/tigris) instead. See [Resource pricing](/about/pricing) for all rates. + ## When to use autostop/autostart {#when-to-use-autostop-autostart} Autostop/autostart works well for apps with highly variable workloads, for smaller apps with low or sporadic traffic, and for most apps that aren't receiving requests continuously. You can reduce resource usage and costs by using autostop/autostart to manage your Fly Machines as demand decreases and increases. You'll never have to run excess Machines to handle peak load; you'll only run, and get charged for, the number of Machines that you need. You can choose to keep one or more Machines running in your primary region. @@ -91,18 +122,7 @@ The defaults differ for new apps created with `fly launch` and for apps with no ### Apps created with `fly launch` -When you create a new app using the `fly launch` command, the default settings in `fly.toml` are: - -```toml -... -[http_service] - internal_port = 8080 - force_https = true - auto_stop_machines = "stop" - auto_start_machines = true - min_machines_running = 0 -... -``` +When you create a new app using the `fly launch` command, `fly.toml` uses the [scale to zero](#scale-to-zero) settings. ### Apps with no autostop/autostart settings {#apps-with-no-autostop-autostart-settings} From 85e77652c361b4d96acf1456d2a47835477db25b Mon Sep 17 00:00:00 2001 From: Kristin Martin Date: Thu, 15 Oct 2026 17:14:29 +0000 Subject: [PATCH 2/3] Describe the idle-cost example by run time, not traffic time --- launch/autostop-autostart.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launch/autostop-autostart.mdx b/launch/autostop-autostart.mdx index 4153dc9235..09b3ed1a58 100644 --- a/launch/autostop-autostart.mdx +++ b/launch/autostop-autostart.mdx @@ -26,7 +26,7 @@ When a request arrives and no Machine is running, Fly Proxy starts a stopped Mac A stopped or suspended Machine isn't billed for CPU or RAM. You pay only for its root file system (rootfs), at \$0.15/GB for 30 days. A [volume](/volumes) is billed for its full provisioned size whether its Machine is running or not. -For example, here's a `shared-cpu-1x` Machine with 512MB RAM in Ashburn (`iad`) that serves traffic 2 hours a day and is stopped the rest of the time: +For example, here's a `shared-cpu-1x` Machine with 512MB RAM in Ashburn (`iad`) that runs 2 hours a day and is stopped the rest of the time: | Item | Monthly cost | | - | -: | From 0bd230e6a0bde11302f3a9d481abfcb2a83d4397 Mon Sep 17 00:00:00 2001 From: Kristin Martin Date: Thu, 15 Oct 2026 17:21:26 +0000 Subject: [PATCH 3/3] Attribute scale to zero to Fly Proxy and link the settings --- launch/autostop-autostart.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/launch/autostop-autostart.mdx b/launch/autostop-autostart.mdx index 09b3ed1a58..499cdbe2b4 100644 --- a/launch/autostop-autostart.mdx +++ b/launch/autostop-autostart.mdx @@ -9,7 +9,7 @@ Get all the details of [how Fly Proxy autostop/autostart works](/reference/fly-p ## Scale to zero {#scale-to-zero} -This `fly.toml` section stops all of your app's Machines when there's no traffic, and starts one again when a request arrives. It's what `fly launch` writes by default. Set `internal_port` to the port your app listens on. +Scale to zero is autostop/autostart with no Machines kept running. With these settings in `fly.toml`, Fly Proxy stops all of your app's Machines when there's no traffic and starts one again when a request arrives. They're what `fly launch` writes by default. Set `internal_port` to the port your app listens on. ```toml [http_service] @@ -20,6 +20,8 @@ This `fly.toml` section stops all of your app's Machines when there's no traffic min_machines_running = 0 ``` +Each setting is explained in [Configure autostop/autostart](#configure-autostop-autostart). + When a request arrives and no Machine is running, Fly Proxy starts a stopped Machine and routes the request to it. A cold start takes about 2 seconds or more for common apps. To wake faster, set `auto_stop_machines = "suspend"`. Resuming a suspended Machine takes a few hundred milliseconds. Check the [suspend requirements and caveats](/reference/suspend-resume) first. ### What an idle app costs {#what-an-idle-app-costs}