Edge Functions

Run WASM modules at the edge.

Deploy WebAssembly functions to 300+ edge locations. Sub-millisecond cold starts. Support for Rust, Go, JavaScript, and Python.

Edge Functionexport default { async fetch(req) { const geo = req.cf.country const data = await KV.get(geo) return new Response(data) }}< 1 ms

WASM

Runtime

< 1 ms

Cold start

300+

PoPs

Sandbox

Isolation

Code at the edge.

WASM functions. Sub-ms cold starts.

WASM runtime

Run WebAssembly at the edge. Rust, Go, JS, and Python support.

Sub-ms cold starts

WebAssembly starts in under 1ms. No cold start penalty.

300+ locations

Deploy to every edge PoP. Execute code closest to user.

Sandboxed isolation

Each execution in V8 isolate. No cross-request leakage.

KV storage

Distributed key-value store at the edge. Eventually consistent.

CDN integration

Intercept CDN requests for personalization and A/B testing.

Getting started

Launch your first instance in three steps. CLI, console, or API — your choice.

Terminal
export default {
  async fetch(req) {
    return new Response("Hello from edge!")
  }
}

Edge patterns.

Personalization and edge authentication.

Edge personalization

Customize content at the edge based on location and device.

View tutorial

Suggested configuration

WASM · KV · Sub-ms

Estimate your costs

Create detailed configurations to see exactly how much your architecture will cost. Pay for what you use, down to the second.

Configuration 1

Estimated: $6.80/mo

Edge Runtime

Usage Volume

M
ms

Connectivity

Provisioned ConcurrencyEliminate cold starts (+$0.015/hr per instance)
Config 1 cost$6.80

Cost details

$6.80

Low-latency code execution at the network edge.

Configuration 1
$6.80
Compute Duration$5.00
Invocations$0.60
Network Egress$1.20
Free Tier DeductionApplied

Works seamlessly with

CDN
KV Store
WAF
IAM
Logging
Monitoring

Frequently asked questions

Code at the edge.

WASM functions. Sub-ms cold starts. 300+ locations.