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 behavior | Function workload |
|---|---|
| Next.js Server Component route | Server rendering |
| Next.js Route Handler | HTTP endpoint |
SvelteKit +page.server load | Server data loading |
| SvelteKit form action | Form submission |
| Nuxt server route | Nitro server handler |
| React Router loader or action | Server data or mutation |
| TanStack Start server function | Server 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.
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.