Podcast
Questions and Answers
Which of the following best describes the evolution from traditional architectures to Function as a Service (FaaS)?
Which of the following best describes the evolution from traditional architectures to Function as a Service (FaaS)?
- From functions to microservices, then to monolith, representing decreasing concern over stack implementation.
- From monolith to microservices, then to functions, representing increasing concern over stack implementation.
- From monolith to microservices, then to functions, representing increasing focus on business logic. (correct)
- From monolith to microservices, then to functions, representing decreasing focus on business logic.
In the context of serverless computing, what does the term 'ephemeral' refer to?
In the context of serverless computing, what does the term 'ephemeral' refer to?
- The short-lived existence of compute containers, potentially lasting only for one invocation. (correct)
- The fully managed aspect of the serverless platform by a third party.
- The stateless nature of compute containers.
- The event-triggered nature of the serverless functions.
According to NIST, what aspect of application hosting is removed by serverless FaaS, compared to PaaS?
According to NIST, what aspect of application hosting is removed by serverless FaaS, compared to PaaS?
- The ability to deploy applications onto the cloud infrastructure.
- Control over the underlying cloud infrastructure. (correct)
- The use of programming languages and tools supported by the provider.
- Control over the deployed applications themselves.
In a serverless architecture, what role does an API Gateway play?
In a serverless architecture, what role does an API Gateway play?
What is a key characteristic of the serverless approach to application architecture?
What is a key characteristic of the serverless approach to application architecture?
In a serverless architecture for a UI-driven application, how does the client interact with the backend?
In a serverless architecture for a UI-driven application, how does the client interact with the backend?
What is a significant advantage of using FaaS, according to Amazon?
What is a significant advantage of using FaaS, according to Amazon?
What billing model is typically used in FaaS?
What billing model is typically used in FaaS?
Which of the following is a key characteristic of FaaS regarding programming languages?
Which of the following is a key characteristic of FaaS regarding programming languages?
In a FaaS environment, what is the developer primarily responsible for regarding resource provisioning?
In a FaaS environment, what is the developer primarily responsible for regarding resource provisioning?
What does 'automatic scalability' mean in the context of FaaS?
What does 'automatic scalability' mean in the context of FaaS?
How are functions typically triggered in a FaaS environment?
How are functions typically triggered in a FaaS environment?
What does it mean for a FaaS function to be 'stateless'?
What does it mean for a FaaS function to be 'stateless'?
What is a typical time limitation for the execution of a FaaS function like AWS Lambda, before it is terminated?
What is a typical time limitation for the execution of a FaaS function like AWS Lambda, before it is terminated?
What does a 'cold start' refer to in the context of FaaS?
What does a 'cold start' refer to in the context of FaaS?
Which of the following factors can affect the duration of a cold start in FaaS?
Which of the following factors can affect the duration of a cold start in FaaS?
What is the role of an API gateway in a serverless architecture?
What is the role of an API gateway in a serverless architecture?
What is a key function that API gateways may perform beyond routing requests?
What is a key function that API gateways may perform beyond routing requests?
Which of the following is a characteristic of FaaS scaling?
Which of the following is a characteristic of FaaS scaling?
Which of the following is a potential benefit of serverless computing?
Which of the following is a potential benefit of serverless computing?
What is a significant drawback of serverless computing as discussed in the lecture?
What is a significant drawback of serverless computing as discussed in the lecture?
Which type of applications would most likely benefit from Serverless architecture?
Which type of applications would most likely benefit from Serverless architecture?
Which of the following is considered an open issue in serverless computing?
Which of the following is considered an open issue in serverless computing?
Considering the evolution of computing paradigms, which platform requires the most effort in managing the operating system?
Considering the evolution of computing paradigms, which platform requires the most effort in managing the operating system?
In the context of serverless computing costs, what is the primary factor that determines the cost of running a function using FaaS?
In the context of serverless computing costs, what is the primary factor that determines the cost of running a function using FaaS?
In a transition from a traditional three-tier application to a serverless architecture, which component typically handles authentication?
In a transition from a traditional three-tier application to a serverless architecture, which component typically handles authentication?
Which of the following is an example of an event that can trigger a FaaS function in Amazon AWS?
Which of the following is an example of an event that can trigger a FaaS function in Amazon AWS?
What is the primary reason data must be externalized from a FaaS function to maintain state?
What is the primary reason data must be externalized from a FaaS function to maintain state?
Compared to PaaS, what does FaaS offer in terms of scaling?
Compared to PaaS, what does FaaS offer in terms of scaling?
A development team wants to deploy an application that has a very uneven traffic shape. Which deployment model could save money?
A development team wants to deploy an application that has a very uneven traffic shape. Which deployment model could save money?
When is the best time to use serverless functions rather than traditional computing?
When is the best time to use serverless functions rather than traditional computing?
Choose the correct answer: is serverless good for number crunching?
Choose the correct answer: is serverless good for number crunching?
The cold start of the lambda function can depend on:
The cold start of the lambda function can depend on:
Benefits in using FaaS regarding costs are:
Benefits in using FaaS regarding costs are:
A company is using AWS Lambda functions and they want to prevent the vendor lock-in, what can they do?
A company is using AWS Lambda functions and they want to prevent the vendor lock-in, what can they do?
In a context where the existing legacy code can be automatically decomposed into smaller-granularity pieces, what can you do?
In a context where the existing legacy code can be automatically decomposed into smaller-granularity pieces, what can you do?
The edge of the Serveless it's intended to support for:
The edge of the Serveless it's intended to support for:
Flashcards
What is IaaS?
What is IaaS?
Virtual servers available in the cloud. They are bare machines.
What is PaaS?
What is PaaS?
Virtual application platforms, such as Python Flask, Node JS Express, and JAVA Spring Boot.
What is Serverless Computing?
What is Serverless Computing?
Provides compute resource abstraction to its logical conclusion. You don't manage servers.
Serverless in the context of BaaS
Serverless in the context of BaaS
Signup and view all the flashcards
Serverless in the context of FaaS
Serverless in the context of FaaS
Signup and view all the flashcards
PaaS definition by NIST
PaaS definition by NIST
Signup and view all the flashcards
Serverless FaaS
Serverless FaaS
Signup and view all the flashcards
What is an API Gateway?
What is an API Gateway?
Signup and view all the flashcards
AWS Lambda definition
AWS Lambda definition
Signup and view all the flashcards
FaaS Pricing model
FaaS Pricing model
Signup and view all the flashcards
FaaS compatibility
FaaS compatibility
Signup and view all the flashcards
FaaS deployment
FaaS deployment
Signup and view all the flashcards
FaaS Scalablity
FaaS Scalablity
Signup and view all the flashcards
FaaS event triggers
FaaS event triggers
Signup and view all the flashcards
Local State
Local State
Signup and view all the flashcards
Invocations
Invocations
Signup and view all the flashcards
Invocation time
Invocation time
Signup and view all the flashcards
Startup latency
Startup latency
Signup and view all the flashcards
Warm start
Warm start
Signup and view all the flashcards
Cold startup
Cold startup
Signup and view all the flashcards
Serverless FaaS scaling characteristics
Serverless FaaS scaling characteristics
Signup and view all the flashcards
Benefits of Serverless Computing
Benefits of Serverless Computing
Signup and view all the flashcards
Drawbacks of Serverless Computing
Drawbacks of Serverless Computing
Signup and view all the flashcards
Cold start problem in serverless
Cold start problem in serverless
Signup and view all the flashcards
Open source Serverless projects
Open source Serverless projects
Signup and view all the flashcards
Study Notes
- The presentation is titled "Cloud Computing: Introduction to Serverless Computing".
What is Serverless Computing?
- With IaaS (Infrastructure as a Service), virtual servers are provided in the cloud, but they are bare machines
- PaaS (Platform as a Service) provides virtual application platforms, eliminating the need to manage the OS and manage scalability
- PaaS does not automate running numerous microservices and requires container orchestration platforms
- Serverless Computing provides compute resource abstraction to its logical conclusion
Evolution of Computing
- Computing has evolved to increase the focus on business logic and decrease the concern over stack implementation
- The progression is from Bare Metal -> Virtual Machines -> Containers -> Functions
What is Serverless?
- There is no one clear definition of Serverless
- In the first case (BaaS):
- Serverless describes applications that use third-party, cloud-hosted applications and services to manage server-side logic and state
- It uses "rich client" applications which use cloud-accessible databases and authentication services
- These services are "(Mobile) Backend as a Service" (BaaS)
- In the second case (FaaS):
- Serverless means applications where server-side logic is written but run in stateless compute containers that are event-triggered
- These containers are ephemeral and fully managed by a third party
- One way to think of this is "Functions as a Service" (FaaS)
NIST Definition of PaaS
- PaaS means "the capability provided to the consumer is to deploy onto the cloud infrastructure consumer-created or acquired applications created using programming languages and tools supported by the provider"
- The consumer manages the applications and not the cloud infrastructure
Serverless FaaS
- Serverless FaaS removes user control over hosting to provide simpler scaling and a more attractive billing model
Serverless Architecture
- In a serverless architectural system, the Edge consists of a UI, API Gateway and Cloud Event Sources
- These connect to the Master, which consists of an Event Queue and Dispatcher
- The Dispatcher connects to Workers
UI-Driven Applications
- Traditional three-tier client-oriented systems use server-side logic
- In this system, Logic in the system (authentication, page navigation, searching, transactions) implemented by the server application
- Serverless Architecture features a service for Authentication, direct access to a Database and split purchase/search functionality
- FaaS functions respond to HTTP requests instead of having an always-running server
No Centralized Management
- In a Serverless architecture there is no central arbiter, instead there is more choreography over orchestration
- It shares principles with a microservices approach:
- Flexibility
- Extendibility
- Division of concerns
- Cost reduction
- Higher complexity
Example: Message-Driven Application
- Message-Driven applications are for backend data-processing services
- Serverless versions replace the long-lived message-consumer application with a "click processor" FaaS function
- The architecture becomes smaller and the system becomes event driven
What is FaaS (According to Amazon)
- "AWS Lambda lets you run code without provisioning or managing servers"
- "With Lambda, you can run code for virtually any type of application or backend service - all with zero administration"
- "Just upload your code and Lambda takes care of everything required to run"
- "and scale your code with high availability"
- "You can set up your code to automatically trigger from other AWS services"
- "or call it directly from any web or mobile app"
AWS Lambda
- AWS Lambda allows the user to "run code without provisioning or managing servers."
- FaaS is about running backend code without managing your own server systems or your own long-lived server applications
- A provisioned server and an always-running application are unnecessary
Subsecond Metering
- With AWS Lambda, "You pay only for the compute time you consume - there is no charge when your code is not running."
- So, one is charged for every 100ms the code executes and the number of times the code is triggered
Language Agnostic
- According to AWS, "With Lambda, you can run code for virtually any type of application or backend service - all with zero administration."
- FaaS offerings do not require coding to a specific framework or library
- FaaS functions are regular applications when it comes to language and environment
- AWS Lambda functions can be implemented in Javascript, Python, Go, any JVM language (Java, Clojure, Scala, etc.), or any .NET language or any language that can compile down to a Unix process
Resource Provisioning
- According to AWS, "Just upload your code and Lambda takes care of everything required to run."
- Deployment is very different from traditional systems
- In a FaaS environment we upload the code for our function to the FaaS provider, and the provider does everything else
Automatic Scalability
- According to AWS, "and scale your code with high availability."
- Horizontal scaling is completely automatic, elastic, and managed by the provider
- The vendor handles all underlying resource provisioning and allocation–no cluster or VM management is required by the user at all
Events
- Functions in FaaS are typically triggered by event types defined by the provider
- Amazon AWS includes S3 (file/object) updates, time (scheduled tasks), and messages added to a message bus
HTTP Requests
- "Or call it directly from any web or mobile app"
- Most providers allow functions to trigger as a response to HTTP requests by using an API gateway
Stateless
- FaaS functions have restrictions when it comes to local state stored in variables in memory, or in a local disk
- There is no guarantee that such state is persisted across multiple invocations
- FaaS functions are described as stateless, so any required consistent state must be externalized outside of its instance
Function Duration
- FaaS functions are usually limited in how long they are allowed to run
- AWS Lambda functions run for five minutes at most
- Long-lived tasks are not suited to FaaS functions
Startup Latency
- It takes some time for a FaaS platform to initialize an instance of a function before each event, from a few milliseconds to several seconds
- Initialization of a Lambda function include either:
- Warm Start, reusing an instance of a Lambda function and its host container from a previous event
- Cold Start, creating a new container instance, starting the function host process, etc
- Cold start may depend on the programming language, how many libraries are used, how much code there is, and the configuration of the Lambda function environment
Function Life-Cycle
- Check if an instance is running
- Either activate the process, or start an instance
- Handle the request and stop the process
API Gateway
- An API gateway is an HTTP server where routes and endpoints are defined in configuration
- Each route is associated with a resource to handle that route
- Handlers are often FaaS functions in Serverless architecture
- When an API gateway receives a request, it finds the routing configuration matching the request.
- In the case of a FaaS backed route, it will call the relevant FaaS function
- The FaaS function executes its logic and returns a result to the API gateway
- This result is transformed into an HTTP response that is given to the original caller
- API gateways may also perform authentication, input validation, response code mapping, and more
- Amazon's API Gateway is a BaaS service that does not need to be provisioned
Serverless Computing Vendors
- Amazon has the most recognized Serverless Computing offering, with AWS Lambda
- Other vendors include Google Cloud Functions, Azure Functions, IBM Cloud Functions, and Pivotal Function Service
- All of them enable you to deploy functions that are executed on-demand and billed by the millisecond of execution time
- Open source Serverless projects include Kubeless, OpenFaaS, and Fn Project
Open Source in the FaaS World
- Serverless Framework: aims to make easier use of tooling provided by AWS and also cross-vendor abstraction.
- AWS's own deployment tool, SAM(Serverless Application Model)is also open source.
- Apache OpenWhisk is an open source FaaS platform
- Microsoft open sourced much of its Azure Functions platform
Comparison with PaaS
- PaaS applications bring entire applications up and down in response to an event
- FaaS platforms do exactly this.
- FaaS and PaaS are different in scaling
- FaaS scales automatically, transparently, and finely.
- This is tied in with the automatic resource provisioning and allocation
Benefits of Serverless Computing
- Reduced operational cost (Serverless is, at its most simple, an outsourcing solution)
- Reduced development cost (A BaaS database removes much of the database administration overhead)
- Reduced packaging and deployment complexity
- Reduced time to market and high flexibility
- Reduced execution costs (save money using FaaS unless your server use is near its limits)
- Greener computing (Reduce inefficiency)
Benefits at a Glance
- Serverless provides milliseconds of provisioning time and blocks of milliseconds for charging granularity
- It also has blocks of milliseconds of costs
- Virtual Machines provide minutes of provisioning time and hours for charging granularity
- Containers provide seconds/minutes of provisioning time and minutes for charging granularity
- On Premise provides minutes of provisioning time and fixed costs
Drawbacks of Serverless Computing
- Vendor control and forced API upgrades may be an issue
- There may be multitenancy problems, vendor lock-in, execution duration, startup latency, and difficult testing
- Security, robustness and performance problems may also occur
Open Issues
- Minimizing the cold start problem
- Degree to automatically decompose legacy code
- Applications may fail without supporting stateful serverless applications with QoS
- Service relies such as identity providers may be unavailable
- Support for events that can be generated at the edge through increased adoption of IoT and mobile devices
When is Serverless Good?
- When it is short-running, stateless or event-driven
- Use for Microservices, Mobile Backends, Bots, ML Inferencing, IoT, Modest Stream Processing and Service Integration
When is Serverless not Good?
- When it is long-running, stateful or requires number crunching
- Use for Databases, Deep Learning Training, Heavy-Duty Stream Analytics, Spark/Hadoop Analytics, Numerical Simulation and Video Streaming
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
This presentation introduces serverless computing and its evolution from bare metal to virtual machines to containers to functions. Serverless computing abstracts compute resources, increasing focus on business logic and decreasing concern over stack implementation. It uses third-party, cloud-hosted applications.