Azure Fundamentals (AZ-900)

Last Updated: 12/19/2022

Azure Functions

  • Azure Functions is an event-driven, serverless compute option that doesn’t require maintaining virtual machines or containers.
  • If you build an app using VMs or containers, those resources have to be “running” in order for your app to function.
  • With Azure Functions, an event wakes the function, alleviating (reduces) the need to keep resources provisioned when there are no events.

Benefits of Azure Functions

  • Using Azure Functions is ideal when you're only concerned about the code running your service and not about the underlying platform or infrastructure.
  • Functions are commonly used when you need to perform work in response to an event (often via a REST request), timer, or message from another Azure service, and when that work can be completed quickly, within seconds or less.
  • Functions scale automatically based on demand, so they may be a good choice when demand is variable.
  • Azure Functions runs your code when it's triggered and automatically deallocates resources when the function is finished. In this model, you're only charged for the CPU time used while your function runs.
  • Functions can be either stateless or stateful.
    • When they're stateless (the default), they behave as if they're restarted every time they respond to an event.
    • When they're stateful (called Durable Functions), a context is passed through the function to track prior activity.

Serverless computing

  • The goal of serverless computing is to help you by taking care of server management tasks (installing an operating system or downloading system updates), so that you can focus your effort on getting you application to your customers.
  • Serverless computing is a bit of a misleading name, because there are in fact servers being used. But what it really means is that the responsibility of managing servers is already handled for you
  • In other words, it's an abstraction of servers so that you can take your mind off of infrastructure concerns and focus them on developer concerns

Benefits of Serverless Computing

  • There's no infrastructure management and as a business you don't have to focus on administrative tasks like installing an operating system, instead, you simply deploy your code and it automatically runs with high availability.
  • As your application grows in popularity, your application will continue working under any workload. Serverless computers can scale from nothing to tens of thousands of requests without any configuration.
  • You only pay for what you use. Serverless computing is event driven, resources are only allocated from a direct action. You are only charged for the time that takes to run your code instead of paying for the resources if they're not being used.