Lifecycle
Section titled “Lifecycle”| Rule | Default |
|---|---|
| Idle VM with no running processes | Sleep on disk after 60 seconds |
| VM with idle processes | Sleep in memory at the break-even wait after its last work |
| Service that declares a port | Saved in memory at the memory deadline; the service resumes |
| Services that declare no port | Stop for a sleep on disk and start again after the wake |
Typed input keeps an auto VM awake |
5 minutes |
keep-awake lease cap |
4 hours |
| Shortest memory wait | 30 seconds |
| Longest memory wait | 300 seconds |
| Awake time after a wake | At least 60 seconds |
| Wake weight | 600 ms of delay per 1024 MiB of resident memory |
| Saved state retention | Until the VM is deleted |
Scroll horizontally to see all columns.
Waking a sleeping VM
Section titled “Waking a sleeping VM”| Answer or header | Meaning |
|---|---|
x-si-wake: warm |
The VM was already awake. No wake ran and the request waited on none. |
x-si-wake: local |
The state came from this node: a memory or disk checkpoint, or a first boot from the node’s base. |
x-si-wake: remote |
A checkpoint that another node committed was adopted at this node’s placement. |
x-si-wake: cold |
A checkpoint that this node had evicted to the object store was fetched before the request. |
503 wake_queue_full |
More than 256 requests wait for this VM. Retry-After is the remaining wake time. |
503 wake_timeout |
The waiter passed its deadline while the wake continued. Retry later; the wake is not cancelled. |
503 not_ready |
The declared service did not answer within its readiness timeout. |
429 |
A real conflict, such as another lifecycle transition on the VM. Wait for Retry-After. |
Scroll horizontally to see all columns.
These codes are in the JSON error body when the client sends Accept: application/json. The status is 503 in either form.
| Queue setting | Value |
|---|---|
| Waiters in the queue | 256 by default; the request that drives the wake is not one of them |
| Waiter deadline | max(3 × the VM's measured wake time, 10 seconds) from the wake’s start |
Scroll horizontally to see all columns.
| Readiness setting | Value |
|---|---|
readiness.port |
1 to 65535 |
readiness.path |
Optional absolute HTTP path |
readiness.timeout_s |
1 to 120 seconds |
| Without a path | A port that accepts a connection is ready |
| With a path | A status below 500 is ready |
| Applies to | Previews of that port only. si exec, terminals, other ports and control API requests are never gated |
| Timeout answer | 503 not_ready with Retry-After: 1, kept until the next wake |
Scroll horizontally to see all columns.
| Server-Timing entry (ms) | Where | Meaning |
|---|---|---|
wake |
node | The total wake, with desc=warm, local, remote or cold. |
queue |
node | Time this request waited for another request’s wake. |
wake_lock |
node | Time spent taking the VM’s checkpoint and disk locks. |
take, load, resume |
node | Restore steps of a memory wake: taking the VMM, loading memory, resuming the guest. |
guest_reseed, guest_resume_hook, guest_restore |
node | Steps inside the VM of a memory wake. |
readiness |
node | The probe of the declared service port after a wake. |
disk |
node | A cold wake’s disk fetch before the response, as desc="<windows>/<bytes>". |
cold |
node | A cold wake’s checkpoint download, with its byte count. |
version |
node | The guest image version that a wake had to fetch, with its size. |
command, exec, guest_connect |
node | The guest call of a command or port request. |
mount, sync |
node | The VM’s disk mount and sync around a command. |
node_total |
node | Time from the request’s arrival at the node to the response headers. |
gate_auth |
gate | Credential, grant and signature checks. |
gate_route |
gate | The VM or port route: a cached lookup or the D1 read. |
gate_upstream |
gate | The fetch to the node. |
total |
Worker | The Worker’s time for the request. |
version |
Worker | The deployed Worker version, when the request reports one. |
Scroll horizontally to see all columns.
Resources
Section titled “Resources”| Setting | Value |
|---|---|
| Shared RAM sizes | 2048, 4096, 8192 or 16384 MiB (2, 4, 8 or 16 GiB). Default 2048 MiB |
| CPU base | 1 CPU per 2048 MiB of RAM |
| Shared CPU ceiling | Twice the base CPU. CPU above base uses shared spare capacity, and contention can reduce the CPU rate |
| Dedicated RAM sizes | 4, 8 or 16 GiB, with whole physical cores |
| Dedicated CPU ceiling | Its base CPU |
| Disk | 50 GiB sparse. Empty space does not count as stored data. A full disk answers 507 |
| Concurrency | 1 to 1024 requests at once; 64 by default; never above the plan maximum |
| Per-VM node ceiling | 16 by default; the effective limit is the lower of this and concurrency |
| Busy VM | Requests above the limit wait in the VM’s queue instead of answering 429 |
Scroll horizontally to see all columns.
| RAM | Base CPU | CPU ceiling (shared) |
|---|---|---|
| 2048 MiB (default) | 1 CPU | 2 CPUs |
| 4096 MiB | 2 CPUs | 4 CPUs |
| 8192 MiB | 4 CPUs | 8 CPUs |
| 16384 MiB | 8 CPUs | 16 CPUs |
Scroll horizontally to see all columns.
| Capacity answer | Meaning |
|---|---|
503 no_capacity |
No free capacity for a create or wake. A running VM is protected first, by refusing new wakes and sleeping quiet VMs. |
409 dedicated_capacity |
No free core for a dedicated create or wake. Create a shared VM, or wait for a core to be released. |
Scroll horizontally to see all columns.
Command input and output
Section titled “Command input and output”| Limit | Value |
|---|---|
| Minimum command timeout | 1 second |
| Default command timeout | 30 seconds |
| Maximum command timeout | 30 seconds |
| Standard input | 1 MiB |
| Combined standard output and error | 1 MiB |
| Arguments, combined | About 512 KiB |
Scroll horizontally to see all columns.
| Signal | Meaning |
|---|---|
X-Exit-Code: 124 |
The command reached its timeout |
X-Truncated: 1 |
Output was omitted |
Scroll horizontally to see all columns.
| Limit | Value |
|---|---|
| File upload | 95 MiB |
| File download | 95 MiB |
| File read as a listing | 16 MiB |
| Stalled transfer timeout | 30 seconds |
| Transfer rate per VM | 16 MiB/s |
| Transfer rate per client address | 32 MiB/s |
Scroll horizontally to see all columns.
| Answer | Meaning |
|---|---|
413 |
The transfer is too large. Read part of a file with a byte range |
Scroll horizontally to see all columns.
Network
Section titled “Network”Outbound
Section titled “Outbound”| Rule | Value |
|---|---|
| Permitted ports | 80 and 443, through the configured proxy |
| Domain filtering | Off by default; your service may enable it |
| Literal IP destinations | Rejected by the proxy |
| Restricted resolved addresses | Rejected by the proxy |
Scroll horizontally to see all columns.
Connections
Section titled “Connections”| Limit | Value |
|---|---|
| Concurrent terminals per VM | 8 |
| Concurrent preview connections per VM | 64 |
| Idle preview connection | About 100 seconds without traffic |
| Preview keep-alives alone | Stop holding the VM after 30 minutes |
| Inbound web traffic | Web addresses only |
Scroll horizontally to see all columns.
Too many connections answer 429.
Account
Section titled “Account”| Limit | Standard | Pro | When exceeded |
|---|---|---|---|
| VMs per organization | 5 | 50 | Creation returns 409 svm_limit |
| Snapshots | 50 | 200 | Taking a snapshot above it returns 409 snapshot_limit; fork and backup snapshots do not count |
| Open ports per VM | 50 | 50 | Opening a port returns 409 port_limit |
| Longest preview link | 30 days | 30 days | A longer link request returns 400 |
| Longest server-sent event stream or watch | 1 hour | 1 hour | The request ends at the plan limit |
| Largest VM | 8 GiB | 16 GiB | A larger create returns 403 size_not_allowed |
| Dedicated VMs | No | Yes | A dedicated create returns 403 size_not_allowed |
| Databases | No | Yes | A database create, branch or restore returns 403 databases_not_allowed |
| Inbox | Yes | Yes | Enable returns 403 inbox_not_allowed |
| Public ports | Yes | Yes | Open returns 403 public_ports_not_allowed |
| Usage | Metered, not a quota | Metered, not a quota | A VM is not stopped or refused at a CPU, memory or transfer total |
Scroll horizontally to see all columns.
Standard creates shared VMs of 2, 4 and 8 GiB. Pro adds 16 GiB, the dedicated tier and databases. A plan change that puts current use above a limit keeps existing VMs, snapshots and ports. New use above the limit is refused.
There is no fixed capacity quota for the whole service. A create or wake can answer 503 no_capacity.
Credentials
Section titled “Credentials”| Rule | Value |
|---|---|
| Key revocation or VM deletion | Applied within 30 seconds by the API gateway |
| Browser VM cookie | Expires after 24 hours or when the user signs out |
| Project-scoped key | Cannot read or change another project |
| Organization key without a project scope | Gets the member set for the whole organization |
Scroll horizontally to see all columns.
Usage metrics
Section titled “Usage metrics”GET /usage returns hourly totals for the organization and each VM. The service measures each VM every 60 seconds.
| Metric | Meaning |
|---|---|
running_ms |
Time the VM ran, in milliseconds. Each running interval is billed in whole seconds rounded up. |
shared_cpu_milli_s |
Base CPU millis times running seconds on the shared tier. A 2048 MiB shared VM adds 1000 millicore-seconds per second. A dedicated VM adds nothing here. |
dedicated_cpu_milli_s |
Base CPU millis times running seconds on the dedicated tier. A 4096 MiB dedicated VM adds 2000 millicore-seconds per second. A shared VM adds nothing here. |
shared_memory_mib_s |
RAM MiB times running seconds on the shared tier. A 2048 MiB shared VM adds 2048 MiB-seconds per second. A dedicated VM adds nothing here. |
dedicated_memory_mib_s |
RAM MiB times running seconds on the dedicated tier. A 4096 MiB dedicated VM adds 4096 MiB-seconds per second. A shared VM adds nothing here. |
storage_byte_s |
Retained object storage in byte-seconds: disk data, snapshots and memory checkpoints in the cold tier, each retention interval rounded up to a whole second. Reported for the organization only. A shared object counts once, until its deletion is confirmed. It changes when data is uploaded, not on every write. |
disk_mib_ms |
Disk blocks the VM holds on its node, sampled every 60 seconds, not its nominal capacity. |
ingress_bytes |
Bytes the VM received from the network. |
Scroll horizontally to see all columns.
The reply is {from_ms, to_ms, totals, plan, svms}. plan names the plan and its limits. The Usage page shows the last 24 hours, 7 days or 30 days.