Skip to main content
Functions

Functions

How Easel Functions run server-rendered pages, API routes, and other dynamic application handlers.

Easel Functions run the server-side parts of your application: server-rendered pages, API routes, server actions, loaders, and other handlers. Easel creates them automatically from your framework's build output, so there's nothing to declare. Functions run in US East; see Function regions.

What runs in a function

Your framework adapter decides which routes become functions. Typical workloads:

Framework behaviorFunction workload
Next.js Server Component routeServer rendering
Next.js Route HandlerHTTP endpoint
SvelteKit +page.server loadServer data loading
SvelteKit form actionForm submission
Nuxt server routeNitro server handler
React Router loader or actionServer data or mutation
TanStack Start server functionServer handler

The number and shape of deployed functions depend on the adapter. Static pages and build assets don't need a function; the CDN serves them. See Framework guides for what each framework produces.

How requests reach a function

A request reaches your function only when nothing earlier in the chain (firewall, redirects, a fresh cached response, or a static file) can answer it. See Routing for the full order.

Cached and static responses can complete without invoking a function.

Scaling

Easel adds function capacity as traffic grows, and one instance can handle several requests at once. Your code can't assume that:

  • The same visitor reaches the same instance
  • Requests run one at a time
  • Memory is shared across instances
  • Files written by one invocation exist during another
  • An instance stays alive indefinitely

Keep shared or durable data in a database, object storage, or the Runtime Cache. For instance lifecycle, concurrency safety, streaming, and the filesystem, see Function runtime.

Caching

A function can sit behind two caches. The CDN cache stores whole HTTP responses and is checked before your function runs; see Caching. The Runtime Cache stores values your code reads and writes during an invocation.

Next steps