What is Serverless, FaaS “Function as a Services”.


10 years ago during a hard discussion with technologists I was explaining that the OS as we are using it at this time (running a server to run an application) was an intellectual no-sense, unfortunately for me these persons denied this reality and gave their usual “business as it is” response.
Now in 2017 everyone can understand that I don’t really need a mouse driver to run a function of a specific code at a time in a process-flow concept.

We are now in this reality of the cloud, IaaS and Paas are well known and a first step, but how we deploy our apps continues to evolve thanks to cloud hosting, Platform-as-a-Service (PaaS), and now Serverless (FaaS) Function-as-a-Service.

What is Function-as-a-Service (FaaS)?

Serverless architectures refer to applications that significantly depend on third-party services (knows as Backend as a Service or “BaaS”) or on custom code that’s run in ephemeral containers (Function as a Service or “FaaS”), the best known vendor host of which currently is AWS Lambda. By using these ideas, and by moving much behavior to the front end, such architectures remove the need for the traditional ‘always on’ server system sitting behind an application. Depending on the circumstances, such systems can significantly reduce operational cost and complexity at a cost of vendor dependencies and (at the moment) immaturity of supporting services.

Principles of FaaS:

  • Complete abstraction of servers away from the developer
  • Billing based on consumption and executions, not server instance sizes
  • Services that are event-driven and instantaneously scalable

 

Timeline of moving to FaaS

At the basic level, you could describe them as a way to run some code when a “thing” happens.

Benefits

Like most things, not every app is a good fit for FaaS.

Some users tried Faas to address a very high volume transactions, there is some transactions that happen hundreds of times per second, and there is a lot of value by isolating that logic to a function that we can scale.

Use Cases

  • Super high volume transactions – Isolate them and scale them
  • Dynamic or burstable workloads – If you only run something once a day or month, no need to pay for a server 24/7/365
  • Scheduled tasks – They are a perfect way to run a certain piece of code on a schedule

Example of FaaS Use Cases

Scenarios include

  • Proxy API credentials
  • Database queries
  • Job dispatching
  • Domain logic

In all of these the Function is in charge of executing a task or performing some kind of data extract, transform, load processing

FaaS makes it easy to write and deploy simple micro-services.

Types of Functions

There are a lot of potential uses for functions. Below is a simple list of some common scenarios. Support and implementation for them varies by provider.

  • Scheduled tasks or jobs
  • Process a web request
  • Process queue messages
  • Run manually

These functions could also be chained together. For example, a web request could write to a queue, which is then picked up by a different function.

FaaS Providers

AWS, Microsoft Azure, and Google Cloud all provide a solution. A lot of innovation is still going on in this area and things are rapidly improving and changing. Below the list of the major FaaS providers.

AWS Lambda, introduced by Amazon in 2014, was the first public cloud vendor with an abstract serverless computing offering.

AWS Lambda initially supported only Node.js. It now supports Python, Java, and C#, and code written in other languages can be invoked indirectly via Node.js

Comparing FaaS vs PaaS

Platform-as-a-Service greatly simplifies deploying applications.

It allows us to deploy our app and the “cloud” worries about how to deploy the servers to run it.

Most PaaS hosting options can even auto-scale the number of servers to handle workloads and save you money during times of low usage.

PaaS offerings like Azure App Services, AWS Elastic Beanstalk, and others, make it easy to deploy an entire application.

They handle provisioning servers and deploying your application to the servers.

Function-as-a-Service (FaaS) provides the ability to deploy what is essentially a single function, or part of an application. FaaS is designed to potentially be a serverless architecture. Although, some providers, like Azure, also allow you to dedicate resources to a Function App.

When deployed as PaaS, an application is typically running on at least one server at all times.

With FaaS, it may not be running at all until the function needs to be executed. It starts the function within a few milliseconds and then shuts it down.

Both provide the ability to easily deploy an application and scale it, without having to provision or configure servers.

FaaS Case Study

If you aren’t too sure if you are ready to take the plunge into FaaS, maybe a case study will help!

Netflix uses AWS Lambda to help manage their AWS infrastructure with event-based systems.

Summary

Developers hate servers ,the idea of serverless architectures is a panacea for developers.

That said, FaaS will certainly be a replacement option for a lot of web application implementation, Iot, big data analytics, AI, and certainly a lot of new projects will use it, verify on AWS Case study page, AWS Lamba is more than used today.

But now what will be the real impact on the enterprise application architectures, and here it is certainly a new story to write, but the FaaS implementation in this area will certainly have some future stories to tell.

Anything you try to fix will take longer and cost more than you thought….so change !  (murphy’s law).

sources:Faas

Leave a Comment


Your email address will not be published.