Function as a service (FaaS) is a cloud computing model that enables cloud customers to develop applications and deploy functionalities and only be charged when the functionality executes. FaaS is often used to deploy microservices and might also be referred to as serverless computing.
Traditional cloud use requires users to provision cloud infrastructure -- including virtual machines, servers, storage and services -- that hosts application code in programming languages, such as Java or Python. That code runs continuously and produces regular recurring business costs.
By comparison, FaaS enables developers to run one function, piece of logic or part of an entire application and only be charged when the code executes. Code is written into the developer end, and it triggers remote servers to execute the intended action. Unlike other cloud computing models that are always running on at least one server, FaaS only runs when a function is conducted and then shuts down.
Hook.io, an open source platform hosting webhooks and microservices, released the first FaaS model in 2014. Offerings from Amazon Web Services (AWS), Google, IBM, Microsoft and Oracle followed.
The importance of FaaSAn organization's existing IT infrastructure might be suitable for multiple business operations yet need assistance for tasks that require high amounts of computing power. Instead of upgrading or buying new infrastructure, the organization could look to a FaaS function to provide and manage the infrastructure it needs.
FaaS services can process large data sets of financial transactions or multimedia. The service provider owns the physical hardware required for these functions, reducing management burdens on the user organization. Large enterprises and small businesses alike can rely on FaaS, but it's especially useful for small and midsize businesses lacking the budget to replace or upgrade their IT infrastructure.
FaaS use casesFaaS offers a convenient and powerful way to build cloud applications that rely on triggered or event-driven behaviors. This approach lets software developers create discrete functions that can be called on demand and that other applications can reuse. Essentially, FaaS enables more modular software designs.
FaaS works in any cloud software project. It has been adopted and optimized in several app development and DevOps areas, including the following:
FaaS is a recent development in most cloud providers' service portfolios. However, they have quickly embraced the technology for its flexibility and support for microservices-based software architectures. The benefits of FaaS include the following:
FaaS poses several tradeoffs that should be considered before including the functionality in software development projects. The following are some of its drawbacks:
Modern software design includes various functional and architectural approaches that incorporate FaaS and microservices. However, these technologies are different and serve different use cases:
The common element of both technologies is the use of virtual containers. Microservices components are typically deployed in containers. Similarly, the code that executes when a FaaS job is triggered is loaded and executed in a container.
Microservices and FaaS aren't mutually exclusive; they can be used together in the same software product. For example, software might be architected for the cloud using microservices and use triggers from microservices code execution -- or a response to events -- to trigger FaaS jobs.
FaaS vs. serverless computingThe terms FaaS and serverless computing are often used interchangeably. Although this isn't technically correct, both concepts share the same underlying goal: to eliminate the need for users to configure and manage infrastructure.
Serverless computingA traditional application requires IT to provision and manage the underlying infrastructure -- including servers, storage and networks -- where the application code is deployed. In the broadest sense, serverless computing is the elimination of this infrastructure management burden.
For example, when a public cloud provider creates a database service and makes it available to users, the users no longer need to worry about building and managing the underlying infrastructure to operate that resource. The public cloud provider manages the infrastructure, and the user invokes the service as needed in a workflow.
Serverless platforms are used in a variety of scenarios. Function as a serviceFaaS is an extension of the concept that the cloud provider handles all the provisioning and management of the infrastructure needed to invoke and run the user's code. This can be called serverless because users need not concern themselves with the underlying infrastructure.
However, serverless functions can potentially run continuously. FaaS and all event-driven computing, on the other hand, are typically intended to load and run ephemeral -- or short-duration -- function execution tasks. If those tasks aren't running, all the related infrastructure is freed. Thus, FaaS is typically one expression of the broader serverless architecture idea.
Comparing FaaS vs. PaaS vs. IaaS vs. CaaSComparing FaaS with other types of services puts individual functions into context. FaaS is commonly measured against platform as a service (PaaS), infrastructure as a service (IaaS) and container as a service (CaaS).
Infrastructure as a serviceIaaS is the traditional representation of cloud computing services. IT resources, such as servers, storage and networks, are virtualized and made available to users. An organization using this approach pays one or more providers for these resources. The organization only needs to perform the security and management tasks, such as configuration, needed to support the infrastructure. IaaS is convenient for large enterprises with bigger budgets.
Organizations might also rely on automation tools and software management tools to select, configure and assemble these resources into a cohesive infrastructure capable of hosting an application for the business. FaaS services are narrower in scope, and the service provider is only responsible for specific functions of a broader infrastructure.
Platform as a servicePaaS is a higher level of abstraction where the cloud provider assembles and manages the underlying infrastructure to host and deliver predefined platform services to users. These platforms often include productivity tools -- think Microsoft's Office 365 -- and software development toolchains. However, they're intended for continuous duty and remain available to users 24/7 year-round.
By comparison, a FaaS is one service in a cloud provider's multiservice portfolio. Functions provide a serverless environment where users don't need to define and configure the underlying infrastructure to execute code. Instead, the cloud provider manages it. This lets users load code, set triggers and execute functions when needed. Once the function code is complete, the underlying infrastructure is released and made available for reuse. All of this happens behind the scenes, hidden from users.
Container as a serviceOrganizations using CaaS rely on a service provider for the infrastructure to build, scale and run the containers for their containerized software. The organization is responsible for managing and running its own containers, but the provider keeps the underlying infrastructure intact. On the other hand, a FaaS service provider manages the specific functions it provides users in addition to the infrastructure.
These examples aren't mutually exclusive. Users can engage IaaS, PaaS, CaaS and FaaS platforms in any combination to facilitate a business application.
Best practices for using FaaSThere are few formal limits on FaaS use, but there are best practices that help developers get the most from a FaaS ecosystem:
All major public cloud providers offer at least one version of event-driven computing services. The following are some of those offerings:
When considering FaaS options, developers should examine the restrictions and limitations of the services. Factors to look at include the amount of code to be executed, the number of calls per second that the cloud can handle and the costs per call.
A good example of FaaS in action is Microsoft Azure Functions managing Office 365 applications. Learn more about how Azure Functions manages Office 365 users and groups.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4