FaaS (Function as a Service)

Learn about the unique benefits and challenges of this cloud computing service model and assess the suitability of FaaS for a variety of application development and deployment methods.

FaaS Overview:

  • FaaS is a type of cloud computing service where the cloud services provider (CSP) owns and manages all aspects of the computing environment, including the hardware infrastructure, middleware, operating system, and even the applications.

  • FaaS can be an economical choice for intermittent or unpredictable usage models that are characterized by brief bursts of activity, because the user pays only for the execution or processing time required to do useful work.

  • Common uses of FaaS include data processing, validation, and sorting, as well as back-end support for mobile and IoT applications.

author-image

By

What Is FaaS?

Different types of cloud computing have gained popularity in recent years as IT leaders embrace the convenience, scalability, and cost advantages of this flexible approach to infrastructure management.

Cloud service providers (CSPs) have responded with a variety of different cloud service models, each with its own level of service. One of the most comprehensive offerings is Function as a Service (FaaS).

In the FaaS model, customers execute code in the cloud, while the CSP hosts and manages the entire back-end operation, from infrastructure through applications. Customers are responsible only for their own data and the functions they perform.

Typically, the FaaS customer pays only for the actual runtime required to execute the “function” in Function as a Service. Execution may take a fraction of a second, and the FaaS system can scale rapidly to accommodate multiple instances simultaneously. There is no ongoing cost charged to the customer for the idle time between the execution of one function and the next.

This event-driven pricing makes this cloud service model an economical choice for developers who have intermittent or sporadic processing needs.

Common uses of FaaS include data processing, validation, and sorting, as well as back-end support for mobile and IoT applications.

“Serverless Computing” That Runs on Servers

The FaaS model is considered “serverless” from the client’s perspective because the CSP manages the cloud infrastructure, platform, operating system, and software applications—all of which may be opaque to the user.

“Serverless computing” is something of a misnomer, however. Even though FaaS users do not manage or even see the hardware, the FaaS model does run on servers. The hardware is owned, operated, and managed by the CSP, so customers can take full advantage of the functionality on demand, without purchasing or maintaining their own servers.

The ‘service’ that’s the subject of the capital ‘S’ in ‘FaaS’ is the business service, as in cloud ‘service’ provider. The service there is the unit of consumption. You’re not paying for the server but for the thing it hosts.”1

Intel® Technologies for FaaS

With most CSPs’ FaaS offerings, the platform components are not specified in any detail. Users cannot typically request a specific hardware technology for their virtual machines. Certain features of Intel® hardware, such as Intel® AVX-512 and AVX2 accelerators, help to optimize performance and improve user satisfaction. For that reason, some CSPs prefer to run their FaaS service offerings on Intel® technology-based platforms.

Even though software developers cannot specify Intel technology-based virtual machines in a FaaS environment, they can ask the CSP for access to Intel-optimized code libraries. Some of these libraries are available in the suite of Intel® oneAPI toolkits and include performance-enhancing code to accelerate complex math routines, compression, encryption, and other compute-intensive tasks. Such optimizations can help the user to save runtime and money on FaaS implementations.

What Are Microservices?

Microservices are part of an application architecture, where a section of the application code operates somewhat independently from other functions. When developing a complex application, the microservices approach isolates different functions from each other, so the entire application can continue to operate even if one service fails.

A microservice-based software development environment can be achieved in the context of a service-oriented architecture. Complex applications are built and maintained as a collection of discrete services that are loosely integrated via application programming interfaces (APIs.) Service-oriented software applications and their component microservices are easier to maintain and upgrade because individual services can be patched or upgraded without taking down the entire application.

Many microservice modules can be both developed and delivered efficiently in a FaaS environment. In many cases, the microservices are containerized, or isolated further, to improve control over each individual portion of the larger application.

How Does Function as a Service Work?

From the user’s perspective, Function as a Service is a prebuilt environment for software development or deployment. The CSP owns and manages the entire tech stack, including all hardware, middleware, and software.

In other cloud services models, the user pays, over a defined period of time, for ongoing access to certain virtual machines or containers and for the resources they consume. In the FaaS model, customers pay only for the time and resources needed to produce a function.

In one CSP’s pricing structure, for example, the duration of a function and its resource deployment are measured in “gigabyte seconds,” rounded up to the nearest millisecond.2

Advantages of FaaS

FaaS users benefit from a pay-as-you-go pricing model that distinguishes this type of cloud computing from other “as a Service” models. The CSP owns and manages the entire technology stack, from hardware through the application software and tools, leaving the users to manage only their own data and functions.

The users pay only for the time when functions or services are actively running in the FaaS environment. These bursts of activity are often measured in milliseconds. The user does not pay for the idle time between those bursts.

FaaS is best suited to workloads that are unpredictable and intermittent.

Challenges of FaaS

For prolonged, uninterrupted workloads, a different “as a Service” model could be more economical than FaaS. Because FaaS usage is often measured and paid in millisecond increments, and FaaS is much more expensive than a typical IaaS cloud service, the constant usage can become prohibitively expensive.

FaaS implementations can also be difficult to debug because the makeup of the development environment is opaque to the user. When extensive testing is required, a different cloud computing model would be preferable, so the user can specify and control for a variety of standard ecosystems. If the software technology is mature and fully platform independent, however, FaaS can be a good fit.

FaaS Use Cases

On-demand functionality is an overall usage model that is well suited to a FaaS environment. In an on-demand setting, features are powered up and down quickly and intermittently. The FaaS user pays only for the time when the feature is active, so the on-demand model is an economical use of FaaS.

Interactive websites are an example of an on-demand usage model, specifically in back-end execution. The FaaS is activated only when an end user clicks on the website and triggers a brief event. Online media publishers and e-commerce sites take advantage of the FaaS model for its flexibility, as users access their site on an unpredictable schedule. For example, a company that provides streaming media may manage its primary site, with its user menus and recommendations, on a CSP’s FaaS plan.

Data processing and validation tasks may be adapted successfully to a FaaS model. One use case would be an Internet of Things (IoT) installation that sends sensor data to the cloud intermittently for analysis.

Software development may also be deployed in a FaaS setting, provided that the development workload is intermittent.

Software deployment can be a good fit with the FaaS model for the delivery of microservices. Software as a Service (SaaS) providers may also run their own operations on a FaaS basis during the start-up phase when they are adding new users quickly and the software is being used in an irregular, on-again-off-again pattern.

Types of Cloud Computing

Cloud computing services can be divided into two basic categories: public and private. Many organizations deploy a combination of the two cloud service models, in hybrid or multicloud configurations.

Public Cloud

In a public cloud service model, the user pays for usage of the CSP’s computing, storage, and network resources. Public cloud services are available on demand, so they can be deployed quickly and budgeted as an operating expense with little up-front investment.

Private Cloud

By contrast, a private cloud runs on the organization’s own data center, which requires a significant up-front investment in hardware as well as ongoing management. Over the long term, a private cloud may be more economical than public cloud service models in some cases.

The advantages of a private cloud include localized control over intellectual property and regulatory compliance, as well as support for business-critical workloads and applications that may not migrate easily to the public cloud.

Hybrid Cloud

With a hybrid cloud, organizations enjoy the benefits of both the public and private cloud service models. The hybrid cloud connects the public and private clouds so an organization can share applications and data between the two environments. Hybrid clouds offer flexibility, scalability, control, and potential cost savings.

Multicloud

In a multicloud model, the organization takes advantage of cloud computing services from several different CSPs. Resource deployment is typically managed in software. A multicloud strategy is extremely flexible because the organization can balance its workloads and optimize costs without being locked into a single CSP’s service offering or technology stack.

Many organizations specify Intel® technology-based instances at each CSP in the multicloud deployment to enable consistency and compatibility across providers.

IaaS, PaaS, and SaaS

Many CSPs offer a spectrum of cloud computing “as a Service” choices, from mere access to server hardware up to and including full-scale, comprehensive options like FaaS.

Infrastructure as a Service (IaaS)

The most familiar, basic cloud computing service is known as Infrastructure as a Service (IaaS.) In the IaaS model, the CSP owns and manages all hardware, including servers, networking, and storage. The user is responsible for the software stack, including subscriptions, licenses, upgrades, and maintenance for all operating systems and applications as well as the organization’s data and functions.

IT managers gravitate to IaaS as an alternative to purchasing and maintaining on-premises or colocated hardware, with the associated capital expense. IaaS is a flexible model that can scale with the user’s needs, and the CSP’s fees are treated as an operational expense in the organization’s budget.

Platform as a Service (PaaS)

Platform as a Service (PaaS) is a cloud services model that offers a more complete development and deployment environment. A CSP’s PaaS offerings typically include all the hardware infrastructure of IaaS plus building blocks that comprise the software platform: the operating system, middleware, development tools, and some types of data management and analytics services.

PaaS users continue to manage the application layer of the software stack, as well as their own data and functions, just as they would in an IaaS arrangement.

Software as a Service (SaaS)

SaaS, or Software as a Service, is likely the most widespread of the cloud computing service models. There are examples of SaaS deployment at almost every organization, including those who reject IaaS in favor of owning and managing a robust, on-premises server infrastructure.

Some applications, such as email, CRM, productivity suites, and file storage, are delivered conveniently in a SaaS model. The organization pays licensing fees for a given time period, and the applications are made available in the cloud. Users and IT teams avoid time-consuming downloads and installations, and there is no need for them to manage updates.

FAQs

Frequently Asked Questions

No, FaaS is not a microservice, but the two cloud computing service types are related. Microservices are modular portions of more complex applications that can be developed or deployed in a FaaS environment.

FaaS is a type of cloud computing service where the cloud services provider (CSP) owns and manages all aspects of the computing environment, including the hardware infrastructure, middleware, operating system, and even the applications.

On the one hand, both PaaS and FaaS offerings include access to hardware infrastructure plus the base software platform, including the operating system, middleware, and some tools and services.

PaaS users continue to manage the application layer of the software stack, while FaaS users are responsible only for their own data and functions.

Yes, the FaaS model is considered serverless because the CSP manages the entire hardware and software stack. FaaS does, in fact, operate on servers, but the hardware is owned and managed by the CSP, so the user’s perspective is a serverless computing experience.