Read a sample: 1. The Compute Decision
A small company wants to put an appointment-booking application online. The application will show available times, accept bookings, and send confirmation messages. Its team has heard that Azure offers virtual machines, containers, managed application hosting, and serverless functions. Each sounds as if it could run at least part of the application.
Which one should the team choose?
The tempting answer is to name a service immediately. A more useful answer begins with questions. Is this a new application or an existing one? Does it depend on a particular operating system? Will it receive a steady stream of visitors or occasional bursts? Who will maintain it after launch? How much work can the team reasonably take on?
These questions prevent the team from comparing services without first understanding what the application needs. A service that works well for one booking system might be awkward for another, even if both serve the same kind of customer.
This chapter introduces a practical way to make that choice. You will learn what compute means, meet the main Azure compute options covered in this book, and compare them through workload needs, management effort, scaling, and cost. The goal is to make a sensible starting recommendation and explain what still needs to be checked.
In cloud computing, compute is the processing capacity used to run instructions. When an application receives a request, checks a rule, prepares a response, or processes a file, compute resources do that work.
Think of a simple online store. When a customer opens a product page, code may retrieve product information and assemble a response. When the customer places an order, other code may validate the request and begin processing it. A background task might later prepare a notification. These activities all require somewhere for code to run.
Compute is only one part of the picture. The store may also need a database for product and order information, storage for images, and networking to connect its components. A compute choice does not automatically settle those other decisions. An application hosted on an Azure virtual machine, for example, might use a separate database service and separate storage.
The word workload describes the application or processing task you are trying to run. It can refer to an entire system, such as the online store, or to one part of it, such as the background task that prepares notifications. Being clear about the scope matters: different parts of the same system may have different needs and may reasonably use different compute services.
For the appointment-booking application, a workload description might initially be as simple as this: “A public web application accepts bookings, and a background process sends confirmations.” That statement is not detailed enough for deployment, but it already suggests that the team may need to consider both a continuously available web component and work triggered by a booking.
Azure offers more than one way to provide compute. The options differ not only in how code is packaged and run, but also in how much of the underlying environment the team manages.
A virtual machine, or VM, is a software-based computer. It has an operating system, processing capacity, and memory, and it can run software much like a physical server. Azure Virtual Machines can be a useful starting point when a workload needs access to the operating system, depends on custom software, or must preserve an existing server-style setup. That control comes with administrative work, including responsibility for the guest operating system and the software installed on it.
Azure App Service is managed hosting for supported web applications and APIs. An API is a way for software to communicate with other software through defined requests and responses. With App Service, a team can focus more directly on deploying and operating its application rather than administering a general-purpose server. The trade-off is that the application must fit the capabilities and constraints of the chosen hosting environment.
Containers package an application and its dependencies into an image that can be run as a container. A container is not a service choice by itself; it is a way to package and run software. Azure provides several options for running containers, including Azure Container Instances, Azure Container Apps, and Azure Kubernetes Service. They address different levels of need, from relatively straightforward container execution to more involved coordination of containerized applications.
Azure Functions is an option for event-driven code. A function can run in response to a trigger, such as a supported event or a schedule. It is often discussed as serverless, a term that describes an approach in which the cloud provider manages much of the server infrastructure. It does not mean servers disappear, or that the application operates without configuration, monitoring, or cost.
These descriptions are starting points, not strict boundaries. A web application can run on a VM, in App Service, or in containers. Some workloads can be divided into functions. The presence of more than one possible service is normal. The decision comes from the requirements and trade-offs, not from finding a label that fits only one option.
A compute comparison is most useful when it starts with a description of the work to be done. “We need a server” is a solution-shaped statement. “We need to run an existing internal application that requires a specific operating system configuration” tells you more about the problem.
Consider several questions:
- What kind of application or task is…