L 11 - FDN Flashcards
Are traditional IT, IaaS, and Paas serverless?
No only FaaS.
What is the unit of scale in traditional IT?
physical servers
What is the unit of scale in IaaS?
VMs
What is the unit of scale in PaaS?
Containers
What is the unit of scale in FaaS?
Functions
How long does the deployment of physical servers take?
hours/days
How long does the deployment of VMs take?
minutes
What is a cloud native application?
Cloud-native applications are a collection of small, independent, and loosely coupled services. They are designed to deliver well-recognized business value, like the ability to rapidly incorporate user feedback for continuous improvement.
Is a monolithic application cloud-native?
No
Are microservices or functions cloud native applications?
Yes
Do you have an API gateway in monolithic applications?
No
What is the difference between a monolithic application and microservices?
In a monolithic application you have an application with has a user-interface and a backend in one “container”.
In Microservices you have a user-interface then API gateway to the different microservices that each have their own database.
What is the difference between FaaS-based apps and microservices?
In microservices you have several microservices after the API-gateway. In FaaS you can have more than one function for each service.
What are 4 steps in FaaS?
You have events that
1. Trigger function invocation
2. Check if an instance is free (No –> cold start new instance (container in VM)
3. Execute Handler Method (function is run)
4. Response to events
What is the Handler Method?
Internet:
In FaaS (Function as a Service), the handler method is the entry point of a serverless function. It is responsible for processing the input, performing the desired actions, and returning the output.
The handler method typically takes two arguments: an event object that contains the input data for the function and a context object that provides information about the runtime environment. The handler method should return a response object or raise an exception if an error occurs.
The signature of the handler method is specific to the FaaS platform being used and is defined in the function definition. For example, in AWS Lambda, the handler method signature is usually written as follows:
python
Copy code
def handler(event, context):
# Your function logic here
return {
“message”: “Hello World”
}
What is the difference between a cold start and a warm start?
In a cold start the code has to be downloaded and then a new instance (e.g. container) is started. You bootstrap the runtime (load the dependencies etc.) and then you execute the function handler.
In a warm start the function handler method executes directly.