Microsoft Azure Functions — Overview

Rocco Scaramuzzi
rocco.tech
Published in
2 min readSep 10, 2019

What is it?

Azure Functions is a Serverless computing service hosted in Microsoft Azure cloud. Azure function is designed to accelerate and simplify the development of applications.

Serverless computing, known as a function as well as a service, is a cloud-computing execution model in which the cloud provider runs the server and dynamically manages the allocation of machine resources.

With Serverless, a developer can simply develop and upload code, and then define triggers or events that will execute the code. Scaling, capacity planning and maintenance operations may be hidden from the developer.

Regarding pricing, instead of paying for pre-purchased resources each month, with Serverless computing the price is generally based on the actual amount of resources consumed by the application.

Azure Functions is formed by event and code. Several built-in events belong to these main categories:

  • Web-based — trigger function on an HTTP request or web-hook
  • Time-based — trigger function on a regular schedule
  • Data based — trigger function on a message in a queue or new item in a Cosmos DB etc

About coding, Azure Functions supports several programming languages such as C#, F#, Node.js, Python and PHP. The code can be written either via a classic IDE or directly within the Azure Portal.

Why Using Azure Functions?

  • Rapid and simple development — your team can focus more on code development
  • Cost-effective pricing — pay for what you use
  • No servers to maintain — Automatic scaling

Azure Functions Use Cases

  • Decomposing or extending monolithic applications
  • Adapters for integrating systems
  • Experiments and prototyping
  • Independent scaling

My Real-World Use Case

Problem

Our customer has asked to build an MVP for their house repair appointment system. The project aims to build a uniform appointment system that allows the booking of a time slot for different contractors. Each contractor exposes its APIs (for getting availability and booking an appointment) and then our uniform appointment system selects the specific API for the right contractor based on the request details.

Solution

  • Back-end: C# with .net core
  • Front-end: React
  • Cloud: Azure Functions, Cosmos DB, Key Vault
  • CI: Azure DevOps
  • Domain-Driven Design

Advantages in hosting the application in Azure Functions

  • Not much effort is required to set up the infrastructure. The team has mainly focused on developing the MVP business logic in a short period of time.
  • Have something deployed and up and running on the cloud from the end of sprint 1.
  • Solutions that are scaled automatically based on the users’ load.

References:

searchcloudcomputing.techtarget.com

https://azure.microsoft.com/en-gb/services/functions/

https://en.wikipedia.org/wiki/Serverless_computing

--

--

Rocco Scaramuzzi
rocco.tech

Tech Lead, Technical Architect, Coder, Senior Software Engineer