Create serverless logic with Azure Functions Flashcards
Which type of function is best suited for Azure Functions, Stateless or Stateful?
Stateless, as functions are created and destroyed on demand
Can Azure functions be deployed to non-serverless environments?
Yes, by default Azure functions are Serverless but they can also be deployed to non-serverless environments.
What is the default timeout for Azure functions?
5 minutes, 2.5 minutes for HTTP response based functions
What are the scaling limitations of Azure functions?
A new Azure function instance can be created every 10 seconds only and upto max of 200 instances.
What are factors that help deciding in use of serverless Azure function computing?
- Execution Time
- Execution Frequency
Where are Azure functions hosted?
Azure functions are hosted in execution context called as Function App.
What type of service plans can be used by Function App?
- Consumption plan
- Azure App Service plan
When should you use App Service plan for Azure Function App?
- Execution time is more than 5 mins
- Function needs to run continuously
- Function requires more processing power
What is the use of a Storage account when configuring Azure Function App?
- Internal operations like logging, and managing execution triggers
- In-case of the Consumption plan, this is where function code and configuration files are stored
What are the 8 services for which Azure provides triggers for Azure Functions?
- Azure Blob storage
- Cosmos DB
- Azure Service Bus
- Queue Storage
- HTTP
- Event Grid
- Microsoft Graph Events
- Timer
What are bindings in Azure Functions?
Binding is a declarative way of connecting data and services to Azure Functions. Bindings have direction like input binding and output binding
How can you add logging to Azure functions?
Azure function is passed a logging object in each language
What is the default Authorization type when creating a Azure function?
Function
what is the HTTP header used to send the function key when executing Azure Functions via HTTP?
x-function-key
What are the input parameters to Timer Trigger for Azure functions?
There are two parameters:
- Timestamp
- Schedule - CRON
What are a few capabilities of using the HTTP Trigger for Azure Functions?
HTTP triggers have many capabilities and customizations, including:
- Provide authorized access by supplying keys.
- Restrict which HTTP verbs are supported.
- Return data back to the caller.
- Receive data through query string parameters or through the request body.
- Support URL route templates to modify the function URL.
What is HTTP Trigger Authorization level?
It helps authorize the trigger to be executed only if the API key is supplied for authentication
What are the authorization levels for HTTP Triggers?
There are three Authorization levels:
- Function
- Anonymous
- Admin
What are the types of keys required for Authorized HTTP triggers?
There are two types of Authorization Keys:
- Function (scopes: Admin, Function)
- Host (scope: Admin)
What are the basic few configurations for Azure Function bindings?
There are a few basic configurations for Azure bindings:
- Name: function parameter to access data
- Type: Type of bindings
- Direction: Direction of data
- Connection: App setting key with connection string
What is a binding expression?
A binding expression is specialized text in function.json, function parameters, or code that is evaluated when the function is invoked, to yield a value
What are the different types of binding expressions?
There are several types of binding expressions:
- App settings
- Trigger filename
- Trigger metadata
- JSON payloads
- New GUID
- Current date and time
What are the extra properties added to the Azure Cosmos DB document on creation?
Following are the properties added to the document created:
- _ts: timestamp
- _etag: for concurrency control
- _rid: resource identifier
- _self: Unique addressable URI for the resource
- _attachments: Addressable path for the attachment resource
What are Durable Functions?
Durable Functions allows you to implement complex stateful functions in a serverless-environment. They can retain state between function calls.