Skip to main content

Common application patterns

Apply recommended Easel patterns for static sites, full-stack applications, APIs, webhooks, and scheduled work.

Static marketing site

Build pages and assets ahead of time, serve them through the CDN, and use immutable caching for fingerprinted files. Add a single-page fallback only when the application uses client-side routing.

Full-stack web application

Use framework-native server rendering and route handlers. Keep sessions and durable state in external services. Cache public responses and shared data independently.

JSON API

Validate inputs, return explicit cache headers, bound request bodies, and set timeouts for downstream services. Avoid caching authenticated responses unless the cache key safely varies by identity.

Webhook endpoint

Verify the provider signature using the raw request body, persist the event or job before returning success, and make processing idempotent. Use a durable queue for work that must retry.

Authentication callback

Keep callback routes dynamic, validate state and nonce values, use secure cookies, and avoid caching authentication responses.

Incremental regeneration

Use the framework's supported revalidation APIs. Verify the resulting cache state and invalidation scope in Preview before relying on it in Production.

Database-backed page

Reuse a concurrency-safe database client. Keep the database region compatible with the Function region and use Runtime Cache for reusable, non-sensitive query results.

File upload

Prefer direct-to-object-storage uploads with signed URLs for large files. Validate metadata and authorization before issuing upload credentials.

Long-running work

Persist a job and return 202 Accepted. Process it with a durable worker that supports retries, visibility, and idempotency rather than holding an HTTP Function open.

Gradual migration

Use rewrites or DNS cutover to move bounded traffic to Easel. Keep the previous platform available until validation and rollback windows have passed.