Azure Functions Flashcards
What is serverless and what are serverless service charateristics?
- Fully managed cloud services
- Abstracts away underlying infrastructure
- Billed based on the execution of your business task
- Can scale-to-zero meaning when not in use the serverless resources cost nothing
- Highly elastic and scalable
- Highly available
- Highly durable
- Secure by default
What is Function as a Service and FaaS characteristics?
- Category of cloud computing service that allows developers to focus on just writing pieces of code (functions) and not worry about maintaining the underlying computing infrastructure
- Event-driven integration trigger functions based on event data or to emit event data
- Generally multiple functions can be orchestrated together to create a serverless app
- Generally only run when needed
- Is not serverless on its own - FaaS is only serverless if its fully-managed and scales to zero
What are Azure Functions and their properties?
- FaaS offering that allows developers to focus on just writing pieces of code (functions) and not worry about maintaining the underlying computing infrastructure
- Lightweight and can be serverless
- Easier to write and deploy
What is a Function App?
- Function App defines the underlying configuration for a collection of functions such as Hosting, Runtime and other global configurations and the compute for a collection of functions.
- Requires a storage account to operate
What are the storage considerations for Azure Function - Function Apps?
- Storage Account
- Blob Storage - maintain bindings state and function keys
- Azure Files - File share used to store and run your function app code in a Consumption Plan and Premium Plan. Set up by default, can create an app without Azure Files under certain conditions
- Queue Storage - used by task hubs in Durable Functions
- Table Storage - used by task hubs in Durable Functions
What core files can be found in an Azure Function?
- function.json - configuration of a single functions bindings
- index.js / Code - code for your function
- .funcignore - files to ignore
- host.json - global configuration of all functions at the function app level
- Local Project - a place to locally store code
What are Azure Function authorization levels and features of the different Azure Function authorization levels?
- Determines what keys, if any, need to be present on the request in order to invoke the function
- Anonymous - No API key required
- Function - Function-specific API key is required
- Admin - Master API key is required
- Can be changed after creation in the portal
- Set on the trigger of the function
How can you debug Azure Functions?
- Enable streaming logs for Azure Functions to see near real time logging when an error occurs
How do you view a stream of log files being generated by Azure Functions?
- Azure Monitor
- Built-in log streaming - Via App Service platform
- Live Metrics Stream - In Azure Portal when connected to Application Insights
Why are Azure Functions fast to execute?
- No large application, startup time, initialisation, and other events fired before code is executed
What are the infrastructure and maintenance costs of Azure Functions?
- No infrastructure and maintenance costs
How are Azure functions executed?
- Event-Driven
- Execution is triggered when an event is fired and can emit event data
How do Azure functions communicate?
- Using industry standard protocols with other APIs, databases, and libraries
How much do Azure Functions cost?
- Pay while your functions are running
- Automatically scale to meet the demand of traffic - underneath Azure will provision more serverless containers
- Can Scale-to-Zero cost
How is CI/CD handled for Azure Functions?
- Built in CI/CD via Azure DevOps