[Music] Welcome to “Comparing the FaaS Model” After watching this video, you will be able to: Identify the benefits and drawbacks of Function-as-a-Service, or FaaS, compared to Platform-as-a-Service, known as PaaS, containers, and virtual machines. FaaS is the most central and most definitional element of the serverless stack. But other compute models play a role in serverless architectures too, so it’s worth exploring how FaaS differs from other common models of compute on the market today, across key attributes. The three main models to compare are platform-as-a-service, containers, and virtual machines. Function-as-a-service boasts an incredibly short provisioning time, in the range of milliseconds. Other compute models cannot rival this provisioning time, often because they require the provisioning of infrastructure. Other models require minutes or even hours. Containers, for example, can spin up very quickly, but an environment is needed to run that container. Provisioning a server or a virtual machine on which the container can run takes more time. Similarly, for virtual machines, applications need to install dependencies and be built in order to run. In addition, provisioning the virtual machine can take considerable time depending on the circumstances. Another characteristic of a compute model is administration. Function-as-a-service requires no administration because infrastructure is abstracted away by cloud providers. But other models require varying amounts of ongoing administration. While this administration is easy for platform-as-a-service, administration becomes more difficult for containers, and virtual machines require significant administration. Greater administration gives you greater controls, but greater administration also requires a lot of time and effort. Elastic scaling is a major component of FaaS, so clearly, this is an advantage for functions. Each action is always instantly and inherently scaled in response to demand. Other models also offer comprehensive, automatic, elastic scaling. The difference is that these models require careful tuning of auto-scaling rules. For example, since other models are less flexible than the pay-per-use model of FaaS, overprovisioning during auto-scaling can result in large, unexpected cost increases. Therefore, rules about the conditions and limits of scaling need to be carefully defined to prevent surprises. FaaS does not require capacity planning. However, other models require a mix of some automated scaling and some capacity planning. For containers, some auto-scaling rules can be created, but capacity planning is necessary to determine the amount of infrastructure on which the containers will run. All maintenance is managed by FaaS providers, and this is also true for PaaS. However, containers and VMs require significant maintenance, including updating and managing operating system, container images, connections, and more. High availability is inherent in the FaaS model without requiring any extra cost or effort. For other models, extra cost and effort is needed for high availability. Again, this is largely due to the burden taken on by the FaaS provider, whereas with other compute models, users need to implement high availability strategies themselves. For virtual machines, this might involve provisioning additional virtual machines in other data centers to be resilient against failures. Because resources are only invoked upon request, resources are never idle in the FaaS model. All other models, however, feature at least some degree of idle capacity. Other models do not feature the scale to zero capabilities that lets FaaS incur costs only when the function is invoked. FaaS is also incredibly flexible when it comes to the granularity of its billing model. FaaS charges per block of 100 milliseconds, which means you only pay for what you use, and not a second more. Other models tend to charge by the minute, or perhaps by the hour. In this video, you learned that: FaaS compares very well against other compute models, with millisecond provisioning time and no administration Provisioning time and amount of ongoing maintenance increase in this order: FaaS, PaaS, containers, virtual machines, Scaling and capacity planning are somewhat automated for models other than FaaS but do require tuning, Compute models other than FaaS can give greater flexibility but require more cost and effort.