Serverless Architecture vs Function as a Service [FaaS]

Serverless architecture does not include physical servers. Serverless computing enables users to no longer spend time and resources on provisioning, maintenance, updates, scaling, and server capacity planning. It eliminates the need for manual patching, administration, and file system monitoring; these activities are handled by the individual cloud service provider and operated by orchestration, therefore removing the burden from developers and IT/Security teams and focusing more on the business logic. 

Serverless: Everything is developed as a function or micro-service within a serverless architecture. This architecture functions within virtualized runtime containers in a cloud environment rather than on a dedicated server instance. With the increased number of workloads moving to the cloud, it didn't take long for IaaS providers to understand the significance of providing fully-managed backends such as databases, caches, load balancers, etc., that sustain the infrastructure required by the workloads. 

Serverless disadvantages

  • As the cloud provider and users, the loss of fine-grained control and manage all the infrastructure have no access to backend infrastructure for custom configurations.

  • Some serverless applications will lack specialized configurations known to end-users. Dealing with serverless database applications is predominant as some features available on standard database deployments will sometimes not be available in the serverless versions.

  • Potentially costly. It might be cost-effective to have dedicated servers to handle the load if you deal with massive data sets or data requests based on use cases.

Function as a service: FaaS is a service model that supports serverless architecture by provisioning runtime containers in which code is executed in a particular programming language and empowers organizations to build/run scalable applications using dynamic cloud models. Building with FaaS allows to pay for individual function implementing w.r.t time rather than paying for constantly running physical servers. 

FaaS functionality: 

  1. Stateless event-driven tasks.

  2. Tasks can be broken into small independent units of work.

  3. Irregular or unpredictable usage patterns within functions.

  4. Peer-to-Peer system communication.

Platform as a service (PaaS) services are similar to FaaS in hiding "servers" from developers. However, such hosting services have at least one server process that receives external requests. Consequently, scalability remains visible to the developer. Scaling is achieved by booting up more server processes, which the developer is generally charged directly for.

An example of a FaaS architecture is the AWS Lambda.  

AWS Lambda is used as a serverless, event-driven compute service that lets one run code virtually for any type of application or backend service without the provisioning or managing of servers. One can trigger lambda from over 200 AWS services and software as a service (SaaS) applications and only pay for the service one uses. 

The difference between AWS lambda and previous serverless technology is that the development focus is on a single function or module instead of service with a large surface area like in the application runtime abstraction. Another rudimentary difference between application and functional level abstraction is where and how you define the invocation mechanism for workloads. The application code describes the invocation mechanism in application abstraction and allows the developer to choose the framework.

Process data at scale: Provides the ability to execute code at the capacity needed and scale to match the data volume automatically and enable custom event triggers.

Run interactive web and mobile backends: One can combine AWS Lambda with other AWS services to create secure, stable, and scalable online experiences.

Enable powerful ML insights: Preprocess data before feeding it to your machine learning (ML) model. With Amazon Elastic File System (EFS) access, AWS Lambda handles infrastructure management and provisioning to simplify scaling.

Create event-driven applications: Build event-driven functions for accessible communication between decoupled services, effectively reducing costs by running applications during peak demand without crashing or over-provisioning resources.

Comprehensive, in-depth features of AWS Lambda

Advantages of FaaS

  • Save time and money on managing servers

  • Pay for what you use

  • Increased scalability, security, and reliability

  • Improved developer productivity

  • Decreased management responsibilities

  • Convenient integrations

Disadvantages of FaaS 

  • Cold starts

  • Compute time

  • VPC/Network issues

  • Application size

  • Vendor lock-in

  • Complex debugging

  • Forensics investigations

 

Usecases:

Netflix Rolled Its Own Node.js Functions-as-a-Service for its API Platform

Operating a Serverless-like Platform At Netflix

Previous
Previous

How I passed my Comptia CySa+?

Next
Next

What makes a process seem suspicious?