Skip to content

You are viewing a free preview of this lesson.

Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.

What is Serverless on Azure?

What is Serverless on Azure?

Serverless computing is a cloud execution model where the cloud provider dynamically manages the allocation and provisioning of servers. Despite the name, servers are still involved — you simply do not manage, provision, or even see them. You write code, deploy it, and the platform takes care of everything else: scaling, patching, availability, and infrastructure.

Azure offers one of the most comprehensive serverless ecosystems of any cloud provider, with services spanning compute, integration, messaging, and API management.


The Evolution of Cloud Computing

Understanding serverless requires seeing where it sits in the evolution of cloud infrastructure:

Era Model You manage
On-premises Physical servers Everything — hardware, OS, runtime, application
IaaS Virtual Machines (Azure VMs) OS, runtime, application
PaaS App Service, Container Apps Application and configuration
Serverless Azure Functions, Logic Apps Application code only

Each step removes a layer of responsibility from the developer. Serverless represents the furthest abstraction — you focus entirely on business logic while Azure handles the rest.


Core Principles of Serverless

Event-Driven Execution

Serverless applications are inherently event-driven. Your code runs in response to events — an HTTP request arrives, a message lands on a queue, a file is uploaded to storage, or a timer fires. When there are no events, there are no running instances and no costs.

Automatic Scaling

The platform scales your functions automatically based on demand:

  • Zero to many — instances spin up as events arrive and scale back to zero when idle
  • Per-event scaling — each event can trigger its own execution in parallel
  • No capacity planning — you never need to predict traffic or pre-provision resources

Pay-per-Execution

On the Consumption plan, you pay only for what you use:

  • Execution count — the number of times your function runs
  • Execution duration — measured in gigabyte-seconds (GB-s), calculated from memory allocation multiplied by execution time
  • Free grant — Azure provides 1 million executions and 400,000 GB-s free per month

This model is fundamentally different from paying for always-on VMs or App Service plans.

Managed Infrastructure

Azure handles all infrastructure concerns:

  • Operating system patching and updates
  • Runtime version management
  • Load balancing and traffic distribution
  • Fault tolerance and availability
  • Security updates

Azure Serverless Services Overview

Azure's serverless ecosystem is not limited to a single service. It spans multiple categories:

Compute

Service Purpose
Azure Functions Event-driven code execution in C#, JavaScript, Python, Java, PowerShell, and more
Azure Container Apps Serverless containers with scale-to-zero, built on Kubernetes
Azure Static Web Apps Hosting for static frontends with integrated serverless APIs

Integration and Workflow

Service Purpose
Azure Logic Apps Visual workflow designer for integrating services with 400+ connectors
Azure Event Grid Fully managed event routing service using publish-subscribe
Azure Service Bus Enterprise message broker for decoupling services

API and Gateway

Service Purpose
Azure API Management Full lifecycle API management with policies, caching, and developer portal
Azure Front Door Global load balancing with serverless edge capabilities

Data and AI

Service Purpose
Azure Cosmos DB (serverless) Globally distributed NoSQL database with serverless capacity mode
Azure SignalR Service (serverless) Real-time messaging without managing connections

When to Use Serverless

Serverless is ideal for workloads that are:

  • Intermittent or unpredictable — traffic spikes and quiet periods
  • Event-driven — responding to triggers like uploads, messages, or webhooks
  • Lightweight and short-lived — individual operations that complete in seconds or minutes
  • Cost-sensitive — pay-per-use eliminates waste from idle resources
  • Rapidly evolving — faster iteration without infrastructure overhead

Common Use Cases

  1. REST APIs — HTTP-triggered functions behind API Management
  2. File processing — thumbnails, virus scanning, or ETL when a blob is uploaded
  3. Scheduled tasks — nightly reports, data cleanup, or health checks on a timer
  4. Event processing — IoT telemetry, log aggregation, or real-time analytics
  5. Webhooks — receiving notifications from GitHub, Stripe, or Twilio
  6. Chatbots — processing messages from Teams, Slack, or custom channels

When Serverless May Not Be the Best Fit

Serverless is not a universal solution. Consider alternatives when:

  • Long-running processes — functions have execution time limits (5 minutes default on Consumption, configurable up to 10 minutes; Durable Functions handle longer workflows)
  • High-throughput, steady workloads — always-on services may be cheaper than per-execution billing at scale
  • Stateful applications — standard functions are stateless; state must be externalised to databases, caches, or Durable Functions
  • Cold start sensitivity — the first invocation after idle may take 1-10 seconds depending on runtime and plan
  • Vendor lock-in concerns — serverless architectures are tightly coupled to the cloud provider's ecosystem

Azure vs Other Cloud Serverless Platforms

Feature Azure Functions AWS Lambda Google Cloud Functions
Languages C#, JS/TS, Python, Java, PowerShell, Go, Rust (custom handler) Node.js, Python, Java, Go, .NET, Ruby, Rust Node.js, Python, Go, Java, .NET, Ruby, PHP
Max execution 10 min (Consumption), unlimited (Premium/Dedicated) 15 min 9 min (1st gen), 60 min (2nd gen)
Orchestration Durable Functions (built-in) Step Functions (separate service) Workflows (separate service)
Visual workflows Logic Apps Step Functions Workflows
Event routing Event Grid EventBridge Eventarc
Free tier 1M executions + 400K GB-s/month 1M requests + 400K GB-s/month 2M invocations/month

Azure's key differentiator is the depth of integration with the Microsoft ecosystem — Active Directory, Microsoft 365, Dynamics 365, Power Platform, and the extensive Logic Apps connector library.


Key Terminology

Before moving on, make sure you are familiar with these terms:

  • Trigger — the event that causes a function to execute (HTTP request, timer, queue message)
  • Binding — a declarative way to connect to data sources without writing boilerplate connection code
  • Cold start — the latency incurred when a function instance is initialised for the first time or after being idle
  • Scale controller — the Azure component that monitors event rates and decides when to add or remove function instances
  • Function app — the deployment and management unit that contains one or more individual functions
  • Host — the runtime process that loads and executes your functions

Summary

Serverless on Azure lets you build applications without managing infrastructure. The platform handles scaling, patching, and availability while you focus on business logic. Azure Functions is the core compute service, but the broader serverless ecosystem includes Logic Apps for visual workflows, Event Grid for event routing, API Management for API governance, and serverless modes across databases and messaging services. Understanding when serverless is — and is not — the right choice is essential to building cost-effective, scalable solutions on Azure.