Time
14 hours 28 minutes
Difficulty
Intermediate
CEU/CPE
15

Video Transcription

00:00
Hello, Siberians. Welcome to lessen 7.1 off Model seven off this car stated. Is that visitor one Microsoft Azure Hock Tech design.
00:11
Here. The landing objectives for this video
00:14
who started by discussing as your function on dhe just introducing you toward a Najar function. Happy's
00:22
then proceeds to cover the cough features off as your functions,
00:28
then required and cover the wrong time visions that exist. Five. Your functions that there are three men one time visions but will cover the differences between them on most importantly, which ones should be using when designing the solution?
00:42
Well, then cover the different Austin plant options that are vilified your function, which determines how you're going to pay for your functions and also has a big impact on your architecture in terms of scalability.
00:56
Then we'll cover our as your function works and go into a bit more details we got in the service
01:03
wouldn't conclude by talking about as your function from a cost perspective.
01:08
Let's get right into this.
01:11
So let's start out by understanding what is your function? Happy's so as the function Abaza service in Azure for running small pieces of court in the cloud what does that mean? What that means is that rather than focusing on a whole application,
01:26
we can break down the application into smaller logic set on implements this small a logic set. US Micro Service is
01:34
running in azure functions, so it fits very well into in micro service's architecture.
01:38
One of the other fish in a barrage of function hap it's that it is an extension off the Azure hap Siri's so Harder feature said that applies to Azure Up. Seven is also applies to azure function, hap
01:53
in terms of some of the other car features off as your functions.
01:57
It's support multiple languages from see shop or the words of scripting language is like power shell times off price and option. They're different options that we have on our pay fires. Your functions we can either pay and something called consumption based is dynamic a pay as you go or we can pay for dedicated resources
02:16
so we can We can have dedicated overserved
02:20
resources available for function have to run it
02:23
also, when it comes to the service's. I mentioned this earlier as your functions is an extension off as 1/2 service was a witch Ms Left, features like Israel. 80. Integration for easy half also what realize your functions
02:36
So it has negatively butin integrations with service's and hodja like cause, most baby an event up on notifications. Hope, which means you can
02:44
read data very easily with from the service is, or you can use them a streakers for you as your function. So it is that done. Native integration, that beauty and also for service, is like get a job and even service is like service boss. So as your functions, Astra visions off the one time
03:01
Now How'd off this revisions of the runtime on Lee to a currently G eight on that's generally available in that division? One on vision, too,
03:10
on one of the other feeds toe notice that only G A releases are supported for production, which means even though you're seeing vision to be on the slide right there,
03:21
it's not something that you want to use in production.
03:23
One of the other things to mention is that Vision one is currently maintenance mode, so announcement have provided on Lian later visions and the water vision to envision tree, so also try to stay away from vision one, if you can on just use vision too many
03:42
when we create a function. Apin agile. One of the things that we have to choose is a Austin plan for what happened, and we have to re Austin plants that are available.
03:52
We have the consumption plan
03:54
on the conception plan. The men case about this is that the APP can scare hope and scale down based on the load that comes in, not something that we need to configure, not something that we need to predetermine. It's set of resources that will be available tohave, we simply say, as a code to run
04:15
and
04:15
as much compute power as that coordinates to run based on the loads that's coming in. Make that available to the court. So that's the consumption plant.
04:25
Then we have the premium plan
04:27
on the premium plan has some key functionalities that doesn't exist in the other's. Number. One is something called pre warmed instances. Now, with as your function like that, said the conception plan. If there no event or execution off the court,
04:43
the happy can scale down to zero instances on what it means is that all of a sudden it is a new trigger. It takes time to implement the back and infrastructure that we want. The code on toe warm it hope so that can lead to Italy. What premium plan allows us to say is to be ableto predefined.
05:01
A seven number off instances that we always stay one so that our court can
05:06
whenever it's triggered can execute as quickly as possible. Right? So that's one of the advantages off using something called off using this premium plan one of the other advantages that it has it I support Virtual network connectivity is in service end points.
05:24
Then we have the dedicated plan.
05:27
The dedicated plan is where we're taking our larger functions and we're running, eats in and as you're up servicemen and as you have seven friends where we redefine a set off resources on the number of resources that our back and can scare too. So we prayed to find that ahead of time.
05:44
Just be aware that if you're using the AB service plan requires that always on is enabled.
05:49
Let's have a look at our job function works.
05:53
The first constructs that we need to implement as your functions is we need a function hap. The function have is what most our coats are. Cord runs within the function happen on our cord is also referred to as functions on. We can have multiple functions running within a function happen
06:11
enough our code to run its need to be tree get
06:15
What are the options that we have when it comes to triggers
06:18
some of the options you can see on the left hand side. So, for example, we can trigger the execution of our code that Allstate with dinner and as your function have based on an event greed subscription, which I'll show you that in the demo based on data being added to Cosmos Deby Collection
06:35
based on event hop based on http tree guys, one of the common ones, every based on the shadow.
06:41
Why so you can say this court executed based on the shadowed frequency based on service possible that some of the
06:47
triggers that we have on the left hand side how so within our coat
06:53
de maybe instances where we needs to pull in sudden information,
06:57
maybe from another service
06:59
Those are called impute bindings in Hajer functions. So impute by Dean is a way to supply data or integrate with the service and be able to supply data right into our quarter. Inject that into overcoat
07:14
in terms off imp input bindings as your function as multiple options off what we can implement. So, for example, we have the blob storage cosmos TB graph FBI signal out table savage and multi porters. We can only have one trigger,
07:29
but we can have multiple input bindings. So, for example, in the case that I have on the screen the trigger objects, tree gas, the execution of the cord and then the court begins to execute. Now we did not. Could we make it called for the input binding to grab some data from Cosmos Day? Be on, then we pull in that data
07:46
on dhe. Then another part of our court maybe does some processing on that data. So you were using put bindings for that? But we can have multiple input bindings,
07:55
but on the one trigger
07:57
also, we wantto outputs the data or the information
08:01
to somewhere else
08:03
that's called out on binding our house with binding in as your functions.
08:09
Not without one bindings. They're multiple bindings that are available. Who also, so they're just some that I'm listing on the screen. This is not by any means an exhaustive list just to give you an idea. So, for example, we could not take that information after that. But the output of our code on then puts that into Cosmos d Be some, well,
08:26
puts that into a queue or past that into event hub, or just put that into
08:31
a bluff stoppage.
08:31
Let's look at the http tree gift for you minutes
08:35
with the edge into poetry gear, which is very common.
08:39
It's a simple as making an issue terrific question. You are Oh, that's generated whenever we create our function, and that's how you trigger the function to execute.
08:50
But we can also control what's allowed and what's not allowed or in what way can our function. Ba Trickett reason http.
08:58
So, for example, we can define the methods that are acceptable, or the method that allowed we can choose get only accepted
09:07
if what we want is a function that only accept request. But that does not allow any rights,
09:13
or we can choose to allow posts or their order issued to be metals that we can choose to allow or not allow.
09:18
We can also define the authorization level that we want. Anonymous level means any wonder has the u. R l can make a request to eat on a country? Got the function to execute
09:31
function level means that the function key
09:35
will be required before you can trigger dysfunction. So whenever I create a function, it generates an AP ikey on di p i ke. You need to supply that within your HDP Heather before you can trick at the function. If it isn't function level authorization
09:52
if you use an admission or system level authorization. What that Mrs say for the function up itself that can contend multiple. Function it as a key and one that has the key to that function up itself. Country. Get any of the other functions within that function? Hap.
10:07
So that's what the admiral system levels identifying, too. But we have control over. That is what I want to get across to you.
10:16
Let's look at some of the design decisions off azure functions like let's look at cost
10:22
when it comes to costs. We mentioned earlier that we have the consumption model or we have the azure half serviceman or we have the premium plan. When it comes to the consumption model, which is one of the most popular options, 1,000,000,000 is based on the number of executions, the execution time on the memory use. That's what we pay for.
10:41
So you say, For example,
10:43
if you have a function consumes about 0.5 gigs of RAM
10:48
and that from Truman runs for three seconds, then the execution costs would be Israel 30.5 giga byte of Render. The function uses times the amount of time that the function is executing for and that is it would all be equals to 1.5 gigabyte per seconds. And that's what we pay for.
11:07
So what that means is I function that once for longer
11:09
costs more. So. If your function is busy unloading all these dependent things and doing all this other stuff, it's going to cost you more in terms of execution because you're paying us Ugo,
11:18
also a function that consumes more memory.
11:22
Also, it's gonna cost more, so be a well off does now when it comes to 1,000,000,000 billion is aggregated across our function within the function up. So we're gonna pay for it at a function up level on is gonna chat for how the functions that are running within the function hap.
11:37
There's a free grant that included on the past subscription basis I light in here. There's a frequent off 400,000 gigabytes per seconds that's free
11:50
in terms of memory. On attempts off execution. This 1st 1,000,000 executions are free. But be aware that this freak grand is on a pass subscription basis, not on a past function basis.
12:01
Also, there's no downside er impact having multiple applications running in the same consumption plan. So if you're worried about air, would this affect performance and some of the other stuff? There's no downside an impact if you have multiple from Trump's Running with Dean, a single function app
12:18
still talking about costs whenever way using Nigel functions. The other cause that we have to be aware of Beyonce's just a function appetite, for example, we cannot create on as your function help without a storage account on that storage account to be beaute. Also for the billions off stoppage account,
12:33
it's also a good practice tohave application insights which will be able to give us more telemetry as to the monitoring off larger function, and that also has its own cost.
12:45
And, of course, we pay network band weeds for data that's transferred outside of the video outside of Asia. There is a cost to that. So there has been transformed within the same region
12:54
is not touch for so maybe that's gonna affect our you architecture solutions. It brings me to the hand off this lesson. Thanks. Right, but for watching and I'll see you in the next lesson.

Up Next

AZ-301 Microsoft Azure Architect Design

This AZ-301 training covers the skills that are measured in the Microsoft Azure Architect Design certification exam. Learn strategies to plan for the exam, target your areas of study, and gain hands-on experience to prepare for the real world.

Instructed By

Instructor Profile Image
David Okeyode
Cloud Security Architect
Instructor