# Deploy Serverless Functions in 30 Seconds

> Zero cold starts, <1ms execution, 300+ global edge locations. Deploy TypeScript workers that scale to millions of requests automatically. Pay only for actual compute time with sub-millisecond precision billing.

Canonical: https://worker.do/

## In code

```ts
import { Worker } from 'worker.do'

// Serverless workers with zero cold starts
const worker = Worker({ name: 'api-handler', memory: 128, timeout: 50 })

// Handle requests at 300+ edge locations
on.HTTP.Request.received(async $ => {
  const user = await $.Database.query.User.byId($.auth.userId)
  const data = await $.fetch('https://api.example.com/data', { retry: 3 })
  return $.Response.json({ user: user.name, data, edge: $.geo.colo })
})

// Schedule background jobs
worker.every.hour($ => $.Database.insert.Stats($.Analytics.aggregate()))

// React to database changes
on.Database.Record.updated($ => worker.cache.invalidate($.record.id))
```

## Frequently asked questions

### How fast are worker.do deployments?

Deploy to 300+ global edge locations in under 30 seconds. Zero downtime deployments with automatic rollback on errors. Every deploy is instant, tested, and reversible. Blue-green deployments with traffic shifting let you gradually roll out changes. Canary releases route 1%, 10%, 50% of traffic to test new versions. Average deployment time: 25 seconds globally.

### What about cold starts and execution performance?

True zero cold starts—workers stay warm at the edge indefinitely. First request is as fast as the millionth request. <1ms JavaScript execution time, <5ms including network I/O. CPU time measured in microseconds for precise billing. V8 isolates provide sub-millisecond startup unlike container-based serverless. Automatic scaling to millions of concurrent requests without provisioning.

### How much does it cost at scale?

Pay only for actual CPU time used with sub-millisecond billing precision. First 100K requests daily are free. After that: $0.50 per million requests with no duration charges. Example: 10 million requests/day with 5ms avg execution = $5/day. 10-50x cheaper than AWS Lambda or Google Cloud Functions. No data transfer fees, no NAT gateway charges, no hidden costs.

### Can I run this in my own cloud or on-premises?

Yes. The SDK is open source and runs anywhere: AWS Lambda, Google Cloud Functions, Azure Functions, Kubernetes, or self-hosted servers. Write once, deploy anywhere—same code works across all platforms. The .do platform provides optimized edge deployment but never locks you in. Migrate between providers without code changes.

### What are the resource limits and constraints?

Up to 128MB memory per worker, 50ms CPU time per request on free tier. Enterprise plans support 512MB memory, 500ms CPU time, and unlimited concurrent executions. Workers can make HTTP requests, query databases, read/write storage, and access queues. No file system access (use KV or R2 for storage). WebAssembly supported for running compiled languages (Rust, Go, C++).

## Part of Platform.do

worker.do is one of the primitives of Platform.do, in the Build layer (ship from code, cli or mcp). Every .do shares one grammar, Business-as-Code, and one SDK.

- What is Business-as-Code? https://platform.do/business-as-code
- Platform.do: https://platform.do/
- Docs: https://docs.platform.do
