Serverless Applications Flashcards

1
Q

Benefits of Azure Functions

A
  • Use preferred language
  • Automate deployments
  • Troubleshoot issues with monitoring and testing tools
  • Flexible pricing options (Consumption and App Plans)
  • Additional => Integration with Application Insights
  • No infrasture to manage
  • Auto Scaling
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are Azure Functions?

A
  • Is a cloud-based compute service. Functions provide event-driven and scalable serverless for Azure. In some cases, you only get billed for the time your function runs
  • Can respond to events or time-based
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Examples of trigger types

A
  • HTTP
  • Storage events
  • Events (Event hub etc)
  • Queue messages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are bindings?

A
  • Allow you to bind data to your app function or send data to.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the two binding types?

A

Input
Output

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Features of Azure Functions

A
  • Flexible Pricing Plans
  • Scalability
  • Event based architecture
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Contrast the pricing options in Azure Functions

A

Consumption
* True serverless option
* Auto scaling

Premium
* Good for functions that are long running
* Functions are kept initialized
* Can scale faster
* Best for underutilized App Service Plans

Dedicated
* Scale based on load and will scale down automatically

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

All functions in a Function App share the same resources and connections?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Identity the Key Components of Azure Functions

A
  • Function Triggers
  • Function Bindings
  • Function Runtime
  • API Management
  • Deployment Slots
  • Function App Configurations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Briefly explain Function Triggers?

A
  • Only one trigger per Function App
  • Triggers start the Function App to execute
  • Triggers define HOW and Function App is invoked
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Briefly explain Function Bindings

A

Allow data to be bound to the App Functions for both inputs and outputs. Input bindings can be access via parameters to the function call.
You can also use client libraries to access data if you don’t want to use bindings.
You can have 0, 1, or more bindings.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Briefly explain Function Runtimes

A

Azure Functions allow for various programming languages to implement your function. Besides C#, there is Node.js, JAVA, and Python.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Briefly explain API Management in Azure Functions

A

AIPM Managment service provides security and routing to your App Functions’ API as a way to expose them as TRUE REST endpoints.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Briefly explain Deployment Slots in Azure Functions

A

Deployment slots are additional instances with it’s own endpoint that can be used to test new versions of your function app and can easily be swap to production

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Briefly explain App Function Configurations

A

Each function app will have it’s own configuration parameters such as connection strings as well as any variables that can be accessed by environment variables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Best examples of uses with App Functions?

A
17
Q

Options for running Work Flows in Azure?

A
  • Web Jobs
  • App Functions
  • Logic Apps
  • Power Automate

Allow the above share similar functionaltiy as far as accept inputs, handle outputs, invoked by an event, and include conditions

18
Q

What is the Design First Approach?

A

Users can use Logic Apps or Power Automate which offers a low code/no code option.
Logic Apps provide an UI to design the business workflows and offers over 200 connectors

Power Automate is similar and can integrate with many difference components as well using connectors. It is a service to create workflows even if you don’t have development experience.

19
Q

What are the 4 types of flows in Power Automate?

A
  • Automated => triggered by an even
  • Button => runs a repeatitive task with a single click
  • Scheduled => Runs on a set schedule
  • Business Process => Models a business process such as an ordering process or complaint

See comparisons below

20
Q

What services use the Code-First Technologies?

A

Web Jobs
Function Apps

21
Q

What 2 types of Web Jobs are there?

A
  • Continuous
  • Triggered
22
Q

What are the differences between Web Jobs vs Azure Functions
* Supported Languages
* Auto Scaling
* Development in browser
* Pay-per-use pricing
* Integration with Logic Apps
* Package Managers
* Can be part of an App Service Plan

A
  • Languages => C# | C#, Java, JavaScript, PowerShell, etc
  • Auto Scaling => No | Yes
  • Test in browser => No | Yes
  • Pay-per-use => No | Yes
  • w/ Logic Apps => No | Yes
  • Pack. Mgrs => Nuget | Nuget and NPM
  • Part of App Plan => Yes | Yes (hosted under an App Service Plan)
23
Q

What are 2 drawbacks of Serverless Computing?

A

Execution Time
* By default, time out is 5 minutes, but can go to 10 minutes
* For HTTP request, the timeout is restricted to 2.5 minutes
* Durable Functions can be used to bypass tese timeout restrictions

Execution Frequency
* If an app function is going to execute continously, it might be cheaper hosing on VM
* Only one Function App can be create every 10 seconds up to a total of 200
(keep in find mind each instance can service multiple concurrent execute so theres no limit how much traffice a single instance can handle)

24
Q

True or False - A Function App must be linked to a Storage Account

A

True

On Consumption Plans, the Storage Account is where the code and configuration are stored

25
Q

Name at least 6 trigger types

A
  • Blob Storage
  • Cosmos DB
  • Event Grid
  • Service Bus
  • Timer
  • Http
  • Graph Events
  • Queue Storage
26
Q

Advantage of using Bindings

A

Do not have to write connection code and manage connections

27
Q

What are some of the properties in the configuration file

A
  • name (the name of the parameter in the function)
  • type
  • direction
  • queueName, path if blob, methods if HTTP { get, post }
  • connection
28
Q

What is the header name when using a function key to secure the HTTPS request

A

x-functions-key

29
Q

What are the authorization levels for Function Apps?

A
  • Function (default)
  • Admin (use master global key)
  • Anonymous
30
Q

What is the CRON expression “sections” in order?

A

seconds, minutes, hour, day, month, day of week

31
Q

Name at least 8 output bindings

A
  • Blob Storage
  • Azure Cosmos DB
  • Event Hubs
  • HTTP
  • Microsoft GRAPH
  • Mobile Apps
  • Notification Hubs
  • Queue Storage
  • Send Grid
  • Service Bus
  • Table Storage
  • Twillo
32
Q

What are binding in parameters for Cosmos DB

A
  • Document parameter name
  • Database name
  • Collection name
  • Document ID
  • Parition Key
  • SQL Query (optional)
33
Q

What are the binding out parameters for Cosmos DB

A
  • Document Parameter name
  • Database name
  • Collection name
  • Partition key
34
Q

Compare Azure Durable Functions vs. Logic Apps (5 comparisons)

A

Development
* Code first Durable Functions
* Design first Logic Apps

Connectivity
* About a dozen built-in bindings but can create your own
* Large collection of connectors

Actions
* Each activity is an Azure Function
* Large collection of read-only make actions (can integrat custom logic through custom connectors)

Monitoring
* Application Insights
* Azure Portal and Azure Monitoring Logs

Management
* REST, API, PowerShell and Visual Studio
* Azure Portal, REST API, PowerShell, Visual Studio Code

35
Q

What should you use in Durable Functions for timeouts and where should “it” be implemented?

A

Durable Timers and should be in the orchestrator function

Use this instead of setTimeout() or setInterval() (JavaScript)

36
Q

Az CLI command for Storage Account

A

az functionapp create
–resource-group
–name
–storage-account
–runtime
–consumption-plan-location
–functions-version

37
Q

Using the Az Core Tools and creating a function app locally, what is the Az CLI Command to publish?

A

az functionapp deployment source config-zip
–resource-group
–name
–src