Embrace the power of cloud

Empower productivity and stay connected while working remotely.


Function as a Service (FaaS)

Share this Post on:

Evaluating enterprise telephony for Microsoft Teams

function as a service-972

Function or Functions as a Service (FaaS) is a hot topic in the world of software architecture. It’s a market forecast to reach $31.53 billion by 2026. FaaS has been gaining lots of attention from the developer community, in particular as one of the fastest-growing cloud delivery models. It’s already changing the way technology is purchased, as well as how it’s being delivered and operated. 

Global uptake of Function as a Service (FaaS) by sector:

Global Uptake of FaaS | RingCentral UK
Image source

FaaS could have a significant impact on businesses going forward, since users don’t have to pay for server redundancy but just for the amount of computing power an application uses per millisecond. Instead of having entire applications on servers, businesses can run them from the cloud. According to Gartner, having this kind of event-sourced, real-time awareness will be on the priority list for 80% of digital business solutions going forward. 

What is FaaS?

Hosting software applications on the internet usually means provisioning and managing virtual or physical servers, along with operating systems and web server processes. With FaaS, all physical hardware, virtual machine operating systems, and web server software are managed automatically by the cloud provider. Instead of having an application on a server, businesses can run it directly from the cloud.

FaaS (Function-as-a-Service) is a cloud computing service that gives users the option to execute code such as Javascript, Linux, or HTML in response to events – without having to build any complex infrastructure (i.e., the infrastructure associated with building and launching micro-service apps). 

Examples of FaaS providers include:

  • IBM Cloud Functions
  • Microsoft Azure Functions (open source)
  • AWS Lambda, by Amazon
  • Google Cloud Functions
  • OpenFaaS (open-source) 
Major FaaS Providers | RingCentral UK
Image source

The difference between FaaS and Serverless

FaaS is not the same as, but is a subset of ‘Serverless and Functions as a Service’. Serverless computing focuses on a particular service category, e.g. database, messaging, APIs, or storage – where the management, configuration, and billing of servers are invisible to end users. FaaS, however, is one of the most central serverless architecture technologies. It is focused on event-driven computing paradigms involving entire application codes only being run in response to requests. 

Benefits of FaaS

FaaS is the ideal tool for companies looking to move their applications efficiently and cost-effectively to the cloud. Some of these benefits include:

  • Being able to focus on code rather than infrastructure. Instead of scaling a monolithic server to handle the potential load, FaaS divides servers into functions so they can be scaled automatically into microservices without the need to independently manage infrastructure. In that way, developers can focus on app coding and reduce the time to market significantly. This can be extremely beneficial to a startup company.  

Below is an example of all the code required to deploy a fully scalable, usable business logic function to the cloud:

Program Coding
Image source
  • With FaaS, end-users only need to purchase resources as and when they are required, i.e. when an action occurs. When the action is completed everything comes to a halt, with no code runs (like Javascript), idle servers, or costs incurred. This makes FaaS cost-effective for companies with dynamic workloads or scheduled tasks, as well as for high-load scenarios. 

Other ecosystems use at least some idle capacity. FaaS is also the only model with resource limits on code size, memory, run length, and concurrent activations. 

  • FaaS offers users the ability to scale automatically, instantaneously, and independently whenever required. As demand decreases, FaaS technology can scale down immediately. With FaaS, each action is instantly and inherently scaled. Other models also offer scaling that’s automatic, but these are slower, with scaling needing to be carefully tuned using auto-scaling rules.
  • FaaS offers the many benefits of a robust cloud infrastructure – it has a built-in high availability spread across multiple availability zones in each given geographic location. FaaS can therefore be deployed multi-regionally without any additional costs.
Capacity Scaling - Autoscaling
Image source
  • FaaS runtime is extremely fast and takes milliseconds. For those used to the minutes or hours other systems take to run, this speed doesn’t compute. But FaaS is charged at a granular level and billed by the millisecond at blocks of 100, rather than by the hour or minute, as is the case with other models. 
  • There is no ongoing administration for FaaS, compared to the easy-to-hard sliding scale of PaaS, containers, or VMs.
  • No capacity planning is required. Unlike other models, FaaS requires no capacity planning. 
  • No maintenance is required. Workflow maintenance is carried out by FaaS providers like AWS Lambdas. This is also the case for PaaS, however, containers and VMs need significant ongoing maintenance – including the updating and management of operating systems, connections, and container images – amongst other tasks.
  • It has high availability and disaster recovery. High availability is inherent in a FaaS setup at no extra cost of effort. Other models require extra management and cost implications. 

Challenges of FaaS

Not every business will be right for FaaS, even though it offers the potential of taking away the unwanted compute automation associated with idle server storage and infrastructure – and helps to keep costs down. 

Things to consider before committing to a FaaS model include:

  • With less responsibility comes less control. When it comes to security, FaaS may not work as well for some organisations. There can also be problems monitoring function apps in terms of how often they occur, the time they take, and in understanding the reasons why they might be slow. Since users don’t have servers to control or the ability to manage the resources on it there’s no possibility of installing monitoring software. 
  • FaaS could open up security issues, including malicious hacking and data leakage. If elements such as Google Cloud functions are running on a multi-tenancy server, users could access each other’s sensitive data. 
  • FaaS means signing up to vendor lock-in and it won’t be easy to move these services from one cloud to another. Every cloud provider approaches FaaS differently – whether public cloud or open source. However, it’s not possible to take a function and move it between cloud FaaS providers. Signing up to a long-term vendor introduces the risk of committing to a cloud that doesn’t offer the features end users may require in the future to deliver business value. 
  • Creating the right ecosystem for a new breed of serverless-computing IT engineers is challenging. Serverless architectures require CIOs to reduce the amount of governance around technical delivery in order to facilitate digital transformation. 
  • With FaaS there’s less transparency around backend infrastructure. With a pay-per-use model, it’s hard to incorporate FaaS into budgets. 

How does FaaS work?

FaaS enables developers to run web applications in response to events without having to manage servers. As it’s an event-driven model, it’s there when needed but doesn’t require server processes to be running constantly in the background as with platform-as-a-service. 

Entire applications are composed of a mix of functions, microservices, and long-running services. Providers make a function available via an Application Programming Interface (API). The provider also manages resource allocation. Since functions are event-driven, not resource-driven, they’re easy to scale and this allows for greater functionality, flexibility, efficiency, and value. 

Functions start in milliseconds to process requests and if there are several requests for a function at the same time the system creates the appropriate copies of the function as required to meet demand. It’s possible to build an entirely serverless application using FaaS – or one made up of a partially serverless and partly traditional microservice model – to take advantage of the latest technology provided by orchestration systems, e.g.’ Kubernetes. 

Kubernetes Architecture | RingCentral UK
Image source

Kubernetes is an open source container orchestration tool critical to the management of cloud-computing functionalities. Kubernetes functions include security, logging, monitoring, and authorisation.

FaaS use cases

FaaS is especially good for high volume parallel workloads – as well as for the creation of back-end systems and for data processing, encoding, format conversion, and data aggregation. 

It is also highly suitable as a tool for back-ends, data-processing, web apps, or to create chatbots for IoT devices. FaaS is useful in helping to manage and oversee third-party services too. 

FaaS for Android app development

When it comes to Android app development it’s possible to keep costs down using FaaS since users are only charged when an app connects to the cloud for specific functions, e.g. batch processing. This makes for a far more cost-effective approach than a traditional method. 

Serverless App Development | RingCentral UK
Image source

IBM Cloud Functions used to forecast the stock market

FaaS is also an invaluable way to boost computing performance. In a recent use case, FaaS helped IBM engineers use IBM Cloud Functions for Monte Carlo simulations to estimate the future outcomes of (estimate) stock prices. 

Monte Carlo simulations are mathematical methods used to estimate the future outcomes of hard-to-predict events. From weather forecasting to complex financial forecasting, this method uses random sampling based on input data to estimate future data outcomes for a model. The larger the sampling the more accurate the range and the better the estimation. 

IBM Cloud Functions provides a fast way to run predictive analysis

IBM Cloud Functions is a serverless FaaS that was used to complete a Monte Carlo simulation for stock prices in just 90 seconds – that’s compared to the 247 minutes it usually takes when run over a laptop with 4 CPU cores. Python code was used to process a number of forecasts to predict stock prices over several days. The next step was to run the same code on a massive scale to process over 100,000 forecasts collected over 1095 days. 

This scale of operation couldn’t be achieved using cloud-based VMs. Instead of running computations locally, IBM Cloud Functions for Monte Carlo was used to run them at a massive scale. Using PyWren IBM Cloud Framework, users were able to focus on the code while the framework focused on execution in the cloud. Once forecasts were complete, a single ‘combiner’ was used to aggregate results and generate a graph with the predictions. 

Program Coding
Image source

The IBM PyWren-IBM Cloud enabled this to be done using only two lines of additional code. 

Explore RingCentral cloud-based communication solutions for business

RingCentral’s unified communications as a service (UCaaS) offering can help improve the efficiency and productivity of a company’s entire communications system. Just as FaaS removes the burden of having to manage servers, RingCentral’s solution saves time and money. With a unified communications system in place, all comms are brought under one umbrella so that employees no longer have to continuously switch between devices and channels in order to collaborate. 

Communication also takes place in real-time – like FaaS, RingCentral’s software is provided as a service, so users need only pay for what they use. 

Ideal for busy SMEs to improve efficiencies, a single, affordable UCaaS solution helps companies to grow and scale their cloud native apps, also ensuring they provide the highest quality of customer service independent of geography or channel. 

Just as serverless architectures look like being the future of cloud computing, RingCentral is set to become the future of business communications – but delivered today. 

As serverless technology grows DevOps will change. In the future, we may see even a case of NoOps – where apps will run themselves in the cloud – with no infrastructure and little or no human involvement. While humans will be required to automate services, they won’t be required to do as much coding using (e.g. Javascript) and testing. With the advent of AI, the IoT, and other technologies, business events will be more quickly analysed with companies moving towards ‘event thinking’.

FaaS offers greater scalability, increased flexibility, and a faster time to release – all at a reduced cost. Just as RingCentral is ideal for SMEs and start-ups to enable them to scale communications, FaaS is useful for smaller businesses in enabling them to concentrate on building products rather than managing servers. That’s why many developers favour FaaS and solutions like Microsoft Azure and Docker, predicting that they will be the future of cloud computing services. 

Originally published Mar 10, 2021, updated May 28, 2021


    Sam O’Brien is the Director of Digital and Growth for EMEA at RingCentral, a Global VoIP, video conferencing and call centre software provider. Sam has a passion for innovation and loves exploring ways to collaborate more with dispersed teams. He has written for websites such as G2 and Hubspot. Here is his LinkedIn.

    Related Terms