# Runtime

A runtime is the execution environment and capacity used to run work. Runtime size describes the resources available; lifecycle behavior describes what happens when that work becomes idle. Choosing one does not choose the other.

## Check which runtime is serving your app

In a backend Project, add a read-only `/version` route that returns the text `release-one`. Open the Project’s **Browser** view and visit `/version`. Check that it shows `release-one`. [Release the revision to a runtime Site](/docs/sites/quickstart), then open the same path at the Site address as an allowed visitor. Change the preview response to `release-two`: the Site should continue serving `release-one` until you release the update. Use Site Logs to investigate production requests and the Project Terminal for development output.

## Production execution

Eligible Site releases run on managed execution infrastructure. The Site owns production configuration, access, data, and usage; the underlying VM infrastructure is managed by Playbooks. This does not promise a dedicated VM for every Site or an unrestricted server account.

A release identifies the code to operate. Source edits do not reach visitors until the intended release is active. Static destinations and application runtimes have different execution needs; use the options supported by the actual Site.

## Match capacity to the workload

Begin with the supported configuration that fits the application, then inspect actual behavior. Memory pressure, slow requests, startup failures, and an external service bottleneck are different problems; increasing capacity will not fix all of them.

Review the runtime choices offered for the actual development or production scope. A Project's development configuration is not automatically its Site's production configuration.

## Understand production lifecycle profiles

| Profile | Behavior | Tradeoff |
| --- | --- | --- |
| On-demand | Stops and can be removed after idle thresholds; recreates from the retained release on traffic | Startup delay when work resumes |
| Warm | Can stop while retaining allocation metadata and writable state | Retained state is not a durable database strategy |
| Always-on | Stays running or recovers after interruption | Ongoing allocated compute usage |

These describe managed production profiles. Use the options available for the selected provider and Site; Sandbox lifecycle is separate. Idle timing is an additional choice, not another compute size.

## Read costs correctly

Active runtime time can include idle grace and draining until a confirmed stop. Stopped compute has no running-time charge, while retained storage and other services keep their own accounting.

A browser tab closing does not prove that a remote workload stopped. Check the resource's state and [Usage](/docs/billing/usage). Budgets constrain new work but do not guarantee zero overshoot or immediately stop every running service.

Keep durable records in [Databases](/docs/services/databases) or [Storage](/docs/services/storage). Treat runtime recovery as restoring execution, not as a backup strategy for every kind of data.

## Example: occasional traffic

An internal application used a few times a day may tolerate startup delay between visits. A frequently used workflow may require different lifecycle behavior. Choose from the actual Site options and inspect response behavior and usage before increasing capacity.

Keep customer records in [Databases](/docs/services/databases) and objects in [Storage](/docs/services/storage), so restarting or replacing execution capacity is not your data-retention strategy.

## Diagnose before resizing

If an export slows down, compare the request or Job evidence with [Logs](/docs/services/logs) and [Monitoring](/docs/services/monitoring). A slow external service, an inefficient query, and memory pressure call for different corrections. Compare usage after a capacity change so you can judge its cost as well as its effect.