Retrace will reach End of Life on March 31, 2027. Click here to learn more.

What Is Function-as-a-Service? Serverless Architectures Are Here!

By: mwatson
  |  May 15, 2017
What Is Function-as-a-Service? Serverless Architectures Are Here!

It has never been a better time to be a developer! Thanks to cloud computing, deploying our applications is much easier than it used to be. How we deploy our apps continues to evolve thanks to cloud hosting, Platform-as-a-Service (PaaS), and now Function-as-a-Service.

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

FaaS is the concept of serverless computing via serverless architectures. Software developers can leverage this to deploy an individual “function”, action, or piece of business logic. They are expected to start within milliseconds and process individual requests and then the process ends.

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. Here is a simple example below from Azure Functions. Shows how easy it is to process an HTTP request as a “Function”.

using System.Net;

public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log)
{
    log.Info("C# HTTP trigger function processed a request.");

    // Get request body
    dynamic data = await req.Content.ReadAsAsync<object>();

    return req.CreateResponse(HttpStatusCode.OK, "Hello " + data.name);
}

Benefits & Use Cases

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

We have been looking to use them at Stackify primarily for our very high volume transactions. We have some transactions that happen hundreds of times per second. We see a lot of value in isolating that logic to a function that we can scale.

  • 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

Function-as-a-Service Features

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.  Read our article on how AWS, Azure, and Google Cloud compare to determine which cloud best meets your needs.

Monitoring Challenges

One of the big challenges is monitoring your function apps. You still need to understand how often they occur, how long they take, and potentially, why they are slow.

Since you don’t necessarily have a server or control the resources they are running on, you can’t install any monitoring software.

How we monitor these new types of apps is going to continue to evolve.

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, I don’t see FaaS as being a complete replacement for normal application architectures. For a basic web application, it would take a lot of functions.

In my humble opinion, function based apps are a perfect fit for replacing potential microservice style architectures and background type services.

Images from Building “Serverless” Integration Solutions with Azure Logic Apps

Improve Your Code with Retrace APM

Stackify's APM tools are used by thousands of .NET, Java, PHP, Node.js, Python, & Ruby developers all over the world.
Explore Retrace's product features to learn more.

Learn More
situs toto pucuk4d indobet toto slot slot depo 10k 8kuda4d toto toto toto bobatoto daftar logototo situs toto situs toto toto bydplay patentoto situs toto slot 4D leon188 situs toto toto toto situs toto ilmutoto mix parlay bayitoto mawar800 login popotogel prize hongkong malam ini toto joker11 lingkartoto https://foundvinylrecords.com/ depo 5k panen100 semibola popo togel https://asupantoto.co/ slot pascol4d login pascol4d login sbobet88 sbobet88 https://nolimithoki.dev/ ini777 dinasti33 slot situs toto slot88 slot jepang slot depo 5k pucuk4d https://www.juara288.asia/ https://shopjoliboutique.com/ slot 4d RP888 toto toto pascol4d situs toto kari4d flokitoto slot gacor logototo slot depo 5k bobatoto bobatoto bobatoto sontogel PASCOL4D LOGIN mpo slot situs toto slot situs slot link slot popotogel login nobu99 logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo bobatoto istanaslot rp888 www.pajaktoto.io kari4d kari4d kari4d kari4d pascol4d pascol4d pascol4d toto slot toto slot slot gacor slot bento11 link slot gacor KARI4D PUCUK4D pascol4d situs slot situs slot toto slot titi4d KARI4D DVTOTO PUCUK4D AMANAHTOTO slot gacor toto toto slot slot AMANAHTOTO toto jinhoki AMANAHTOTO toto slot slot777 situs slot situs slot situs slot AMANAHTOTO https://www.asupan188.dev/ slot gacor gampang menang coloktoto coloktoto coloktoto toto slot toto slot gacor bwo303 situs toto toto slot slot gacor slot88 slot gacor slot gacor slot gacor situs slot link slot toto toto toto slot gacor slot resmi slot88 situs toto MySlot188 SlotPoker188 slot gacor slot gacor pucuk4d PASCOL4D slot gacor slot gacor situs slot link slot pentaslot SLOT GACOR AMANAHTOTO TOTO 4D pajaktoto slotvip toto togel situs toto toto slot situs slot situs slot situs slot toto slot gacor slot777 toto slot slot gacor situs slot link slot slot thailand patentoto situs judi bola situs toto roma77 slot jpmania toto228 RATU89 RUSIA777 slot gacor POPOTOGEL : Situs Resmi Bandar Toto Togel Macau dengan Prediksi Gokil Pasti Akurat PARLAY slot gacor slot gacor slot gacor togel link slot slot gacor BUNGASLOT slot slot gacor situs slot slot gacor slot gacor sejukbos link slot gacor
situs toto pucuk4d indobet toto slot slot depo 10k 8kuda4d toto toto toto bobatoto daftar logototo situs toto situs toto toto bydplay patentoto situs toto slot 4D leon188 situs toto toto toto situs toto ilmutoto mix parlay bayitoto mawar800 login popotogel prize hongkong malam ini toto joker11 lingkartoto https://foundvinylrecords.com/ depo 5k panen100 semibola popo togel https://asupantoto.co/ slot pascol4d login pascol4d login sbobet88 sbobet88 https://nolimithoki.dev/ ini777 dinasti33 slot situs toto slot88 slot jepang slot depo 5k pucuk4d https://www.juara288.asia/ https://shopjoliboutique.com/ slot 4d RP888 toto toto pascol4d situs toto kari4d flokitoto slot gacor logototo slot depo 5k bobatoto bobatoto bobatoto sontogel PASCOL4D LOGIN mpo slot situs toto slot situs slot link slot popotogel login nobu99 logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo logototo bobatoto istanaslot rp888 www.pajaktoto.io kari4d kari4d kari4d kari4d pascol4d pascol4d pascol4d toto slot toto slot slot gacor slot bento11 link slot gacor KARI4D PUCUK4D pascol4d situs slot situs slot toto slot titi4d KARI4D DVTOTO PUCUK4D AMANAHTOTO slot gacor toto toto slot slot AMANAHTOTO toto jinhoki AMANAHTOTO toto slot slot777 situs slot situs slot situs slot AMANAHTOTO https://www.asupan188.dev/ slot gacor gampang menang coloktoto coloktoto coloktoto toto slot toto slot gacor bwo303 situs toto toto slot slot gacor slot88 slot gacor slot gacor slot gacor situs slot link slot toto toto toto slot gacor slot resmi slot88 situs toto MySlot188 SlotPoker188 slot gacor slot gacor pucuk4d PASCOL4D slot gacor slot gacor situs slot link slot pentaslot SLOT GACOR AMANAHTOTO TOTO 4D pajaktoto slotvip toto togel situs toto toto slot situs slot situs slot situs slot toto slot gacor slot777 toto slot slot gacor situs slot link slot slot thailand patentoto situs judi bola situs toto roma77 slot jpmania toto228 RATU89 RUSIA777 slot gacor POPOTOGEL : Situs Resmi Bandar Toto Togel Macau dengan Prediksi Gokil Pasti Akurat PARLAY slot gacor slot gacor slot gacor togel link slot slot gacor BUNGASLOT slot slot gacor situs slot slot gacor slot gacor sejukbos link slot gacor