Function as a Service (FaaS)
FaaS deploys individual functions that run on demand in response to events, with automatic scaling and pay-per-invocation billing.
Function as a service (FaaS) is a cloud model where the unit of deployment is a single function. Developers write a function, attach it to a trigger, and the provider runs it on demand, scaling instances up and down automatically. FaaS is the most common form of serverless compute. Examples include AWS Lambda, Azure Functions, and Google Cloud Functions.
How It Works
Each function is bound to an event source such as an HTTP endpoint, a message queue, a storage event, or a schedule. When an event fires, the platform allocates an execution environment, loads the function code, runs it, and returns the result. Concurrent events spawn multiple instances. Functions are stateless and short-lived, so they store data in external databases, object storage, or caches. Providers impose limits on memory, execution duration, and payload size, and bill by the number of invocations and the compute time consumed.
Why It Matters
FaaS lets teams ship small, focused units of logic without managing servers, and it scales seamlessly from zero to high concurrency. It fits event-driven architectures, glue code between services, and bursty workloads well. The main drawbacks are cold-start latency when a new instance initializes, execution-time limits that rule out long-running jobs, and platform-specific APIs that can create lock-in. Designing idempotent, stateless functions and minimizing dependencies keeps cold starts low and behavior predictable.
Related Terms
FaaS is the core of serverless computing, is affected by cold starts, and pairs naturally with event-driven architecture and platform-as-a-service offerings.