Skip to main content
Functions

Function configuration

Configure Node.js version, CPU and memory, and maximum duration for Easel Functions.

Easel derives function settings from your project settings and your framework's build output. The defaults suit most applications; change them only when you have a specific need.

SettingWhere you set it
Node.js versionProject settings → Functions → Node.js version
CPU and memoryProject settings → Functions → Function CPU
Maximum durationRoute config in your framework, such as maxDuration

Project settings apply to new deployments. Redeploy to pick up a change, and try it on a preview deployment before you promote it to production. Function regions aren't configurable; see Function regions.

Build settings, such as the root directory and install and build commands, are covered in Build configuration. Environment variables are covered in Environment variables.

Node.js version

Choose 24.x (the default) or 22.x. Builds and functions use the same version.

Easel doesn't read engines.node from package.json, so set the version in project settings. Before you switch, check framework and SDK compatibility and rebuild any native dependencies.

CPU and memory

Function CPU sets the CPU and memory for every function in the project:

TierMemoryCPU
Standard2 GB1 vCPU
Performance4 GB2 vCPU

Standard fits most server rendering and API routes. Performance suits heavy rendering and data work, and costs more to run; see Pricing.

Choose Performance when a function does CPU-bound work, loads a large bundle or large in-memory data, or runs out of memory under normal load. A bigger tier won't fix unbounded caches, memory leaks, buffered streams, or request state kept in module scope, so check for those first.

Maximum duration

Maximum duration is how long one invocation can stay active. It covers your handler, awaited network calls, streaming the response, and post-response work from waitUntil or after().

There's no project setting for duration. Set it per route in your framework. In Next.js:

export const runtime = "nodejs";
export const maxDuration = 60;

Easel reads the value from the build output. Routes without a valid value get the default, and values outside the allowed range are clamped; see Function limits for both.

Pick a duration that lets normal requests finish without hiding slow ones. Move work that can't finish inside a request to a durable job system; see Background work.

Native dependencies

Packages with native components must match the runtime's operating system, CPU architecture, C library, and Node.js version. Packages that depend on post-install scripts or prebuilt binaries are the most likely to break. Test them on a preview deployment.

Next steps