|
| 1 | +--- |
| 2 | +title: "Compute private beta" |
| 3 | +description: "Early access to the new microVM-based compute runtime." |
| 4 | +sidebarTitle: "Compute private beta" |
| 5 | +hidden: true |
| 6 | +--- |
| 7 | + |
| 8 | +<Warning> |
| 9 | + MicroVM compute is in private beta. Use it in staging only - do not run production traffic on it |
| 10 | + yet, and expect bugs. |
| 11 | +</Warning> |
| 12 | + |
| 13 | +## What it is |
| 14 | + |
| 15 | +MicroVM compute is a new runtime for your tasks, designed for fast cold starts via boot snapshots. For most tasks the migration is transparent - the same task code runs unchanged. |
| 16 | + |
| 17 | +## Getting access |
| 18 | + |
| 19 | +You can't opt in yourself. Once we've enabled the private beta for your org, the `us-east-1-next` region becomes available on the **Regions** page in the dashboard. If you'd like access, ping us on Slack. |
| 20 | + |
| 21 | +## Routing runs to microVM compute |
| 22 | + |
| 23 | +MicroVM compute is exposed as a region: `us-east-1-next`. The region is tagged with a **microVM** badge on the **Regions** page. |
| 24 | + |
| 25 | +### Per-trigger override (recommended) |
| 26 | + |
| 27 | +The `region` option is part of `TriggerOptions`, accepted by most triggering functions. |
| 28 | + |
| 29 | +```typescript |
| 30 | +import { yourTask } from "./trigger/your-task"; |
| 31 | + |
| 32 | +await yourTask.trigger(payload, { region: "us-east-1-next" }); |
| 33 | +``` |
| 34 | + |
| 35 | +This is the safest way to opt in during the beta - you control exactly which runs land on microVM compute. |
| 36 | + |
| 37 | +To gate it on an environment variable so prod isn't affected, define one constant and reuse it at every call site: |
| 38 | + |
| 39 | +```typescript |
| 40 | +const defaultRegion = process.env.USE_COMPUTE_BETA === "1" ? "us-east-1-next" : undefined; |
| 41 | + |
| 42 | +await yourTask.trigger(payload, { region: defaultRegion }); |
| 43 | +``` |
| 44 | + |
| 45 | +Set `USE_COMPUTE_BETA=1` in the staging environment of the app that calls `trigger()` (typically Vercel, or wherever you deploy your app). |
| 46 | + |
| 47 | +### Set it as your project default |
| 48 | + |
| 49 | +Open the **Regions** page in the dashboard and set `us-east-1-next` as the project-wide default. This applies to **all environments in the project**, so only do this on a project that is running staging traffic only. |
| 50 | + |
| 51 | +## Cold start expectations |
| 52 | + |
| 53 | +A few things to be aware of during the beta: |
| 54 | + |
| 55 | +- **`small-1x` is the default and what we've optimized for.** Boot snapshots are precreated for `small-1x` only. Other machine sizes will have a slower first run after each deploy while we generate the snapshot - subsequent runs use it. |
| 56 | +- **Avoid `micro` during the beta.** Cold starts on `micro` are noticeably slower than other sizes. |
| 57 | + |
| 58 | +We'll be shipping CLI and SDK changes during the beta to make cold start times more consistent across machine sizes. Compute-specific prereleases will be announced on this page as we go, and we'll also reach out on Slack. |
| 59 | + |
| 60 | +## Reporting issues |
| 61 | + |
| 62 | +Send anything weird (errors, slow runs, restore failures, anything that surprises you) over Slack with the run ID. The more reproductions we get during the beta, the faster we harden it for public beta. |
0 commit comments