Skip to content

Limits, placement and recovery

The envelope is what managed infrastructure gives every product: what code may be written in, its limits, where each part runs, and how it recovers.

One call, placed and kept

Records, runs and their logs stay in the Namespace's region. Filled: what a caller sees.

What runs, and inside which limits

The limits below hold for every product; the plan meters on the price list cap concurrency, request rates and schedules on top of them.

FamilyWhat it gives every product
Languages for codeA code Function is TypeScript in the file or in a module beside it, or a Python or WebAssembly module by path, shipped with the Version and pinned by its Digest
What code may touchIts input, its Thing, the secrets it names and the tools it is given; anything outside goes through a Source or an effect, never a raw network call
Compute classesstandard for most work, and large for heavy model and agent work, with more memory and time, metered on its own allowance
Long workA run that waits does not count against its time: an agentic run or a Workflow waits for weeks, and only its working time is limited
PlacementEdge for cached reads, the site, the docs and the offer card; the Namespace's region for records, runs, effects, model calls and logs
CachingPublic reads cached at the edge, keyed reads per Customer, each read cleared by the next deploy and by every write to a record it read
The record storeOne transaction per write inside one Namespace: the fact, its Event, its meter line and its audit entry together; reads after a write see it
ScaleRecords, files and Events grow with each Namespace; a Customer that outgrows shared infrastructure moves to its own with no change to any Interface
RecoveryContinuous backups per Namespace, restore to any point in the last 35 days, a single record restored to any version, and region failover inside the residency
Boundstandardlarge
One run's working time30 seconds by default, timeout up to 15 minutesUp to 60 minutes
Memory256 MB4 GB
A request or reply body10 MB10 MB
A file upload5 GB, resumable5 GB, resumable
A record1 MB, files apart1 MB, files apart
A Batch100 calls100 calls
A bulk job10 million inputs10 million inputs

Example

A score in code, a long research run on the large class, reads cached for an hour, and a recovery promise the offer card prints.

definition.ts
18 lines
import { define, code, agentic } from 'apis.dev'

/** Answers about any company by its domain, from a score in milliseconds to a person's check in hours. */
export default define({
  name: 'summaries', domain: 'summaries.apis.dev',
  Company: {
    domain:   'url!#',
    score:    code('./score.py', { timeout: '10s' }),              // a Python module
    research: agentic('Find the head of sales at {domain}',
      { returns: { headOfSales: 'string' }, compute: 'large', timeout: '30m' }),
  },
  offer: { 'Company.score': 0.001, 'Company.research': 0.5 },
  operate: {
    cache:    { 'Company.score': '1h' },          // cleared by each deploy
    recovery: { rpo: '5m', rto: '1h' },           // printed on the offer card
    regions:  ['us', 'eu'],
  },
})

Where each part runs

Each Namespace has one region, and every part that touches its records runs there.

PartWhere it runs for an eu Namespace
Records, files, Events and backupsIn the EU, in two places at least
Calls, runs and Workflow stepsIn the EU, after the edge passes them on
The model routerOnly providers that process in the EU and keep nothing; a call no such provider serves is refused, never routed out
Effects and SourcesSent from the EU; a Source outside it is named on the security page with what crosses
Logs, traces and the Call recordKept in the EU; a sink sends them only where the Customer's admin points it
Cached readsAt the edge, only for reads with no personal or sensitive field

Backups, restores and failover, state by state

The recovery promise per isolation tier is data on the offer card, measured by drills and kept in the proof record.

IsolationMost data a failure losesService back within
Shared5 minutes1 hour
Its own1 minute15 minutes
ThingStatesWhat moves it
A run at its limitRunning, then failed with a Problem at its timeout, at no chargeIts working time; a wait does not count
A cached readfresh, stale, clearedIts time in operate.cache, a deploy, a write to a record it read
A restorerequested, restoring, then done or haltedRestore.create by the Customer's admin or your operator; it writes the old state as a new change, so nothing is lost
A regionserving, failing_over, failed_over, failing_backA failed region moves its Namespaces to the paired one inside the same residency, and back
A drillscheduled, running, then passed or failedEach quarter per tier; its measured loss and time replace the proof on the offer card

What engineers, admins and agents meet

  • An engineer. Bounds stated before the first call, a timeout it can set, and a failed run that costs nothing.
  • A Customer's admin. Its region on every part, the recovery promise on the security page, and a restore it runs itself.
  • A security reviewer. Where each part runs, what crosses a border, and the last drill's measured numbers.
  • An agent. The same limits on every Interface, a Problem at a limit, and Age on a cached reply.

Every product runs inside one stated envelope, so its limits, its region and its recovery are facts a buyer reads before it calls.