Azure Serverless Computing

Click to share! ⬇️

Azure Serverless ComputingWhat is Serverless? Serverless is a term in cloud computing that describes when the underlying servers, infrastructure, and operating systems, are taken care of by a cloud service provider. The client only needs to worry about writing code for an application. Serverless in Azure is very robust and offers the same highly available, scalable, and cost-effective experience as other approaches to cloud computing. For example the Azure Container Instances can be thought of as a serverless offering. In this article, we’ll focus on the three services in Azure that are most commonly referred to as fitting into the Serverless paradigm. These are Logic Apps, Functions, and the Event Grid.

Azure Logic App

Azure Logic Apps
Azure logic app is a cloud service that helps to schedule, automate, and orchestrate tasks, business processes, and workflows. There are hundreds of pre-built connectors for Microsoft and third-party services to choose from. Power automate which was previously known as Flow is built on top of Logic App.

  • With Logic Apps you can automate business processes and create workflows in a low-code environment with a visual interface. The service also has built-in connectivity to existing platforms, like SalesForce and SAP. The flexibility exists to develop and run small snippets of code if necessary.

  • Azure Functions

    azure serverless functions
    Azure functions are described by Microsoft as an event-driven, compute-on-demand experience that extends the existing Azure application platform. Azure functions make use of code-triggered events that occur in Azure as well as on-premise systems. The key thing to remember about Azure Functions is that they are triggered by events. The functions only run when they are triggered, that is a key aspect of Azure Functions. A serverless solution lets you pay only at the time when the code runs and execution is triggered via an HTTP request.

    Azure Event Grid

    azure event grid
    The Azure Event Grid enables clients to easily manage events across different Azure services and applications. Event Grid follows the pub-sub model, or event driven programming. Various services in Azure can emit events. For example all of the folowing can emit events:

    • Azure Blog Storage
    • Azure Resource Groups
    • Azure Subscriptions
    • Azure Event Hubs
    • Azure Media Services
    • Azure IoT Hub
    • Azure Service Bus
    • Azure Maps
    • Azure Container Registry
    • Azure SignalR Service
    • Azure App Configuration
    • Azure Machine Learning
    • Azure Communication Services
    • CloudEvents Sources
    • Custom Events

    When any events trigger from the above services they are sent to be processed via the Event Grid.

    event grid proxy

    which in turn get processed via various Event Handlers.

    event grid event handlers

    The event handlers can be things like serverless code in Azure Functions, workflow integration within Azure Service Bus or Logic Apps, Event Hubs, Storage Queues, Hybrid WebSocket Connections, Webhooks, and Azure Automation. So what you have is an application or cloud service that is reacting to an event. This is a very pragmatic and useful model, as oftentimes it makes sense to wait until something very specific happens before taking an appropriate action based on that event. Once a subscription is created, Event Grid will push events to the configured destination. This makes it easy for software developers to make use of the push model instead of the much less efficient pull model where consistent polling is required.

    PaaS Vs Serverless

    This serverless architecture sounds pretty interesting you may be thinking, but isn’t this approach already offered in the PaaS deployment model? Kind of. Let’s look at the differences here.

    PaaS vs Serverless

    There is some overlap between Platform as a Service and Serverless computing. In both scenarios software developers still have to write code. In addition, there is no server management. The differences come in with regard to deployment, scalability, and run-time considerations. With PaaS, there is more control over the deployment environment and the application needs to be configured to scale. With Serverless, there is less control over the deployment environment yet the application scales automatically. Serverless may also encounter what is known as cold starts since code is only executed when it is triggered.

    What Services Can I Use As Serverless In Azure?

    Azure has many different cloud services that fall under the Serverless umbrella. Let’s take a look at a few of them here:

    • Serverless Kubernetes – Azure Kubernetes Service and AKS Virtual Nodes can be used to deploy pods inside of containers that start very fast with no need to manage extra compute resources.
    • Serverless Functions – Simply write the logic you want in the progarmming language you choose to create event driven experiences via Azure Functions.
    • Serverless App Environments – Azure App Service provides the ability to easily deploy and mange Mobile, Web, or API driven solutions.
    • Serverless Workflow – Azure Logic Apps makes it possible to set up custom workflows or third party SaaS connectors like Dropbox or Salesforce.
    • Serverless API Management – Azure API Management can be used to monitor APIs, as well as transform and secure their interfaces.
    • Serverless Messaging – The Azure Event Grid is the service that makes event based application communication possible in combination with Azure Service Bus and the CloudEvents schema.
    • Serverless CI/CD – Continuous integration with continuous delivery is the modern approach to application development and is made possible in Azure with Azure DevOps services. In addition to CI/CD, teams can autmatically trigger software builds, automate package management, and deploy to any cloud.
    • Serverless Azure SQL Database – The Azure SQL Database Serverless service offers the best in class serverless SQL experience in the Azure Cloud with automatic scaling, and pay as you go with per second granularity.
    • Serverless Cosmos DB – Azure Cosmos DB is one of Azure’s most powerful database option for massively scalable, multi-model database services, to create database triggers, input bindings, and output bindings.
    • Azure serverless storage – Azure Blob storage can be used to build web applications or for massively scalable storage for unstructured data.
    • Azure serverless monitoring – By using Azure Monitor, IT professionals can collect, analyze, and act on telemetry from any mission critical application.
    • Azure serverless analytics – Azure Stream Analytics and Microsoft Power BI are the tools to use to develop and run massively parallel real-time analytics on multiple streams of data.

    Serverless Computing Summary

    • Event Driven Scale – A serverless function can be triggered or trigger other events allowing one to create complex applications that scale automatically.
    • Abstraction Of Servers – Servers are entirely abstracted away. Application code is simply described as functions. These functions can run on different compute instances.
    • Micro-Billing – Serverless compute can run for just a fraction of a second. Billing is often narrowed down to micro-seconds which can save money.
    • Common Serverless ServicesAzure Functions, Blob Storage, Logic Apps, Event Grid.
    • Developers can deploy code and pay for its runtime only without worrying about the provisioning configuration and management of the underlying infrastructure.

    Learn More About Azure Serverless Computing

    Click to share! ⬇️