Which Azure Service Should I Use to Host My Web App?
Getting started developing cloud-based web apps and wondering which Azure service to use? There are many options — each with pros and cons.
Jun 08, 2023 • 0 Minute Read
Cloud technologies can turn on and off like a tap. It’s becoming so much easier to build solutions in Azure, each and every day.
But if you’re just getting started developing cloud-based web apps, you might be wondering, "Which Azure service should I use?" The answer is there are loads of options, and each has its own pros and cons.
Let's take a high-level look at some of the most popular hosting services within Azure and discuss the purpose and key considerations of each. This should help you select the right service for your web app.
Azure provides a myriad of services, from compute to data analytics. We’ll focus on several app hosting services, also known as compute services. This will include:
- Virtual Machines
- Azure App Service
- Azure Functions
- Container in Azure
Want to learn more about Azure certifications?
Check out our Azure Certifications and Learning Paths.
Virtual Machines
One of Microsoft’s earliest cloud services, Virtual Machines provide you with a Linux or Windows machine to call your own. You control everything from hardware through to the operating system and applications.
If you’re developing a solution that requires full access to the operating system, Virtual Machines may be for you. Consider a PHP web application which you have built. In such a scenario, you might be managing Linux, Apache, the PHP runtime, operating system security and updates, as well as the deployment of your code and any integration with any software development platforms you use (e.g., Github or Azure DevOps).
This can be useful when you have special requirements, such as support for legacy applications or runtime stacks, or additional dependencies or custom scripts which you must run. However, the downside is that you must manage the complete stack end-to-end.
And what about high availability and load balancing? You'll need to manage that too.
Azure App Service
Where Virtual Machines provide full access and support for nearly any solution or dependency, Azure App Service is more constrained. However, it is a fully managed hosting environment, which means there's a lot less for you to manage.
Azure App Service supports many runtime environments, including Linux or Windows-based solutions, .NET, .NET Core, Node.js, Java, Python, and PHP. But its true power lies in all the additional features that you can access so easily.
Let’s say you’re building an ASP.NET Core web application. With Azure App Service Web Apps, you can easily integrate with manual or automated development platforms like GitHub to publish your code, and many standard features are available at a few clicks. Do you need custom domains, SSL, and autoscale? It doesn’t take a lot to enable.
The platform is built to support modern, highly scalable web apps, with a lot less to manage.
Azure Functions
While you won’t be running full MVC web applications with Azure Functions, you can definitely deliver APIs and facilitate integration between your decoupled solutions.
Azure Functions is considered a “serverless” technology. Yes, there are certainly servers involved, but out of all the options so far, you’re the furthest away from managing any underlying infrastructure.
If you have a small piece of code you need to run in response to a trigger (think “event-driven architecture”), Azure Functions may be a great option for you. You'll only pay for the execution time and resources (using the Consumption hosting model), and several languages (such as C#, Java, and Python) are supported.
Containers in Azure
You may have been reading so far and thinking that some of these services sound great, but what if I develop using containerized solutions? Well, fortunately, there are several services that support containers.
Firstly, it’s great to know that if you like the sound of Azure App Service or Azure Functions but you need to use containers they both support container deployments.
If you’re building a solution that requires specific dependencies or languages, that aren’t supported through Azure App Service or Azure Functions, you can deploy your solution with a custom Docker container.
Azure also provides several container-specific services. For example, Azure Container Instances allows you to rapidly deploy simple containerized solutions. If your solution requires more advanced monitoring, scaling, and orchestration, then you could even use Azure Kubernetes Service instead.
One more thing
Whatever type of web application you’re going to build, there is a range of services that can support you. I hope that this article has provided you with some insight into a service that might help with the awesome solution that you’re going to build!
If you’ve selected your service and now you want to know more about how to architect and implement it, check out the following resources. They may come in handy.
Just getting started with Azure and want to know more about where to begin with basic concepts? Check out our free course, Azure Concepts. Or, if you're familiar with AWS and curious about how things work in Azure world, this guide will give you a crash course on the differences between AWS and Azure. If you are looking to dive in to Azure, make sure to check out our many Azure hands-on training; including out Azure Fundamentals AZ-900 learning path.