Struggling to tell your APIs from your CDNs? Read our comprehensive cloud computing glossary covering the most common terms.
< Back to glossary
Function as a Service (FaaS) is a model of cloud computing that allows application functions to be executed and operated by developers without provisioning or taking care of the underlying infrastructure such as servers or virtual machines. It is one type of serverless computing where there is a concentration on event-driven triggers such that code runs in reaction to specific events or requests. FaaS enables developers to develop functional blocks of code that are executed on demand and reduce the cost and complexity of supporting legacy infrastructure.
Event-Driven Execution: The FaaS functions are triggered by events such as user input, API calls, or scheduled jobs. The resources are automatically freed once the function has been executed, reducing the costs and boosting efficiency.
Serverless Architecture: The cloud provider is responsible for the underlying infrastructure, including server provisioning, patching, and scaling. This allows developers to focus solely on writing and deploying their code.
Cost Efficiency: The users are only charged for the compute time utilized by their functions, making it a cost-effective option for applications with variable workloads.
Scalability: FaaS auto-scales to address demand, ensuring that apps can handle surprise spikes in traffic without human interference.
Streamlined Development: FaaS eliminates server management, allowing developers to focus on coding business value.
Cost Savings: The pay-per-use model reduces startup costs and running costs associated with infrastructure upkeep.
Enhanced Agility: FaaS allows for quick deployment and iteration of code, enabling companies to innovate and respond quickly to changing market conditions.
Imagine a web app that employs FaaS to perform user authentication. When a user logs in, an FaaS function is called to authenticate the credentials. This function executes on the cloud infrastructure, processes the request, and then terminates, thus saving on resources and cost. This solution is especially valuable for applications that experience changing traffic volumes, since it automatically scales to handle traffic without the need for human input.
Function Design: Ensure that each function does one, distinct thing to avoid complexity and minimize costs.
Cold Start: Consider the potential “cold start” latency when functions are first invoked after a period of inactivity.
Vendor Lock-in: Consider the potential risks of vendor lock-in when choosing a FaaS provider because it might be challenging to migrate functions across providers.
In summary, FaaS is an excellent development tool for modern applications, offering scalability, cost savings, and simplicity of infrastructure management. With FaaS, developers can develop elastic and adaptive applications that cater to users’ evolving demands by understanding its benefits and limitations.