Architecture & BFF

Serverless Functions

Direct Definition

Serverless functions are small units of code that run on demand in response to events such as HTTP requests, with the cloud provider handling servers, scaling, and patching. You pay per invocation rather than for idle capacity, and functions scale to zero when unused.

Technical Architecture & Deep-Dive

Platforms like AWS Lambda, Google Cloud Functions, and Vercel Functions popularized serverless by packaging code into containers that spin up per request. This removes infrastructure work but introduces cold starts, where a new container must boot before handling traffic, often adding hundreds of milliseconds.

Regional serverless functions also run in one data center, so global users pay extra network latency. Edge functions built on V8 isolates start in under five milliseconds and execute in hundreds of locations, making them better suited to latency-sensitive API proxies and BFF layers.

Key Architectural Benefits

No servers to provision, patch, or scale manually.
Pay-per-use pricing with automatic scale to zero.
Fast iteration for small API endpoints and event handlers.
REALCOMPOSER EDGE WORKSPACE

Implement Serverless Functions at the Edge

Deploy lightweight API aggregation, edge caching, and secret injection in minutes without Docker containers or complex servers.

START BUILDING FREE

Frequently Asked Questions

Q:What is the difference between serverless and edge functions?

Serverless functions usually run in one cloud region inside containers with cold starts. Edge functions run in lightweight isolates across a global network, starting almost instantly near each user.

Related Architecture Concepts

Ready-to-Use Edge Recipes