Serverless Fxn Flashcards
(6 cards)
What is a serverless fxn?
A serverless function is a small piece of code that runs in a compute service, like the cloud, without the need for provisioning or managing servers. These functions are triggered by specific events, such as HTTP requests,
database changes, or schedule tasks.
What is a hot start?
A hot start is when an existing execution environment is already running and ready to execute the function code, resulting in the fastest startup times.
What is a warm start?
A warm start occurs when the provider has an initialized execution environment, but it’s not currently running. It needs to be woken up and set up before executing the function, making it slower than a hot start, but still relatively quick. If no suitable environments are available, the provider must create a new cold environment from scratch, provisioning resources, setting up the OS and runtime, and initializing dependencies
What is a cold start?
This cold start process takes the longest and can potentially cause higher latencies. Because the different starts can significantly affect function responsiveness and consistency, cloud providers implement various strategies. These include pre-warming environments and maintaining warm pools to minimize cold starts and their performance impact on latency-sensitive serverless applications.
What are the benefits to serverless computing?
Serverless computing can significantly reduce infrastructure costs, especially for applications with unpredictable or intermittent workloads.
You only pay for the resources consumed during execution and not for idle capacity.
Furthermore, with serverless computing, developers can quickly build and deploy applications without worrying about infrastructure provisioning and management, allowing for faster iteration and time to market.
Cloud providers automatically scale serverless functions to handle increased workloads, ensuring high availability and elastic scalability without any manual intervention.
Developers are also freed from responsibilities like server provisioning, patching, and capacity planning, enabling them to concentrate on coding and enhancing business outcomes.
Finally, serverless computing offers granular billing based on the exact resource consumed and execution time, enabling precise cost tracking and optimization.
Due to these advantages, serverless computing is well-suited or a wide range of use cases. These include APIs and real-time file processing, IoT, and mobile backends, data processing and analytics, and scheduled tasks and job processing.
What are the disadvantages of a severless fxn?
First, when a function is invoked after a period of inactivity, it may experience a delay due to the need to spin up a new execution environment.
Second, serverless offerings from different cloud providers may have varying capabilities and vendor-specific configurations, potentially leading to vendor lock-in.
Third, debugging and monitoring serverless applications can be more challenging than traditional models as the cloud provider manages the execution environment.
Fourth, designing and managing serverless applications can introduce architectural complexities.