> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Lifecycle & Placement

> Where a stateful actor instance runs, when it is activated and evicted, and what survives a restart. Instances are placed on first touch, evicted when idle, and restarted on deploy or host failure — only storage survives.

A stateful actor instance is activated on demand, kept in memory while it's busy,
evicted when idle, and can be restarted or relocated at any time. You don't manage any
of this — but you design around it, because **only what you write to `storage` survives.**

## Where it Runs

An instance is placed on **first touch** — the first method call to a name brings it
up. After that you address it by name, never by location; the platform routes every
call to wherever the instance currently lives. (`idFromName` accepts a `locationHint`
option, reserved for regional placement — see
[Actor Namespace](/docs/edge-compute/stateful-actors/api-reference/namespace).)

## Activation and Eviction

* **Activated on demand.** Naming an instance is cheap; the first method call to a name
  brings the instance up and routes the call to it.
* **Kept warm while busy, evicted when idle.** Between calls, an idle instance may be
  removed from memory to free resources, then re-activated on the next call.
* **Restarted on deploy or host failure.** A new code version or a host issue tears the
  instance down and re-creates it.

## What Survives a Restart

In-memory state — instance fields like `this.x` — is a **cache**. It vanishes on
eviction, restart, or relocation. Your actor's `storage` is the **truth**: it is durable
and reloaded when the instance next activates. Treat memory exactly like a process that
can be `SIGKILL`ed at any instant — only what you flushed to `storage` is real. (This
is guarantee 4 in [Execution model](/docs/edge-compute/stateful-actors/concepts/execution-model).)

A common pattern is to load from `storage` once on activation and cache the result in
memory; just never assume the cache is still there.

## Next Steps

* [How it works](/docs/edge-compute/stateful-actors/concepts/how-it-works) — the execution model and its guarantees
* [Addressing](/docs/edge-compute/stateful-actors/concepts/addressing) — naming and routing instances
* [Runtime API](/docs/edge-compute/stateful-actors/api-reference) — `ctx.storage`, `blockConcurrencyWhile`
