What is the difference between Azure Container Instances and Web App for Containers?
Asked Answered
M

4

42

I just deployed a web app (node.js container and mongo container) using Azure multi-container instances. It's a bit like Docker Compose but works with an Azure specific yaml file: https://learn.microsoft.com/en-us/azure/container-instances/container-instances-multi-container-yaml

Now I see that there is something called "Azure Web App for Containers". This seems to work with a real docker compose yaml file.

Other than the configuration file format, are there any other differences?

Note: I'm talking about Azure container instances, not Azure container services.

Manson answered 6/2, 2019 at 10:19 Comment(1)
sidenote: apparently web app for containers == app service using a custom containerCleat
A
35

Well, azure container instances bill you only for the time container is active, while webapp bill you for the time webapp exists (so all the time). that is one of the biggest differences between those.

But overall, I'd say Azure Web App for Containers is just a shortcut to run containers on existing "stuff". I've recently learned that Azure Web App for Containers offer kubernetes capabilities, so these 2 services evolve in a slightly different directions. Azure Web App for Containers is targeted at long running stuff (always running) while ACI are aimed at scheduled\burstable\short lived workloads (similar to Azure Functions).

Avalanche answered 6/2, 2019 at 10:24 Comment(8)
Can you provide a link to anything that confirms that ACI is targeted at short-running scenarios?Sarette
that's kinda by definition (learn.microsoft.com/en-us/azure/container-instances/…)Avalanche
I'm not seeing anything in that article supporting your claim. The reason I bring this up is that I myself want clarity on this. I was previously under the same impression as you, but then I've seen people starting to host their databases and long running applications in ACI, which is why I'm now looking for official information about what direction they're gonna take ACI.Sarette
how about reading first 5 lines? Azure Container Instances is a great solution for any scenario that can operate in isolated containers, including simple applications, task automation, and build jobs. For scenarios where you need full container orchestration, including service discovery across multiple containers, automatic scaling, and coordinated application upgrades, we recommend Azure Kubernetes Service (AKS).Avalanche
There's nothing in that paragraph supporting the claim that ACI is "targeted at short lived workloads". It only says it's for isolated containers as opposed to orchestrated multi-container scenarios.Sarette
well, all of the above, combined with the cost\billing model of ACI, makes me believe that. you can run long running task in ACI if you dont care about the cost.Avalanche
@JohnKnoop "task automation, and build jobs" are inherently short lived workloads, rather than continuously available services!Paniculate
@Paniculate no one has disputed the fact that they are suitable for those purposes. The question is, are ACI's only suitable for those purposes. I just had a look at the latest documentation on ACI and they're also saying that they are suitable for "simple applications" with the benefit of serverless, so I'd still like some clarity as to whether or not they are officially not recommended for long-lived applications.Sarette
D
6

Found this link with MS-staff answer.

In summary

Web App for Containers

  • Recommended if you are already familiar with the Azure Web App environment.
  • Best if you have one or a few long-running containers/services that are being deployed.
  • Can use a custom Docker image to run your web app on an application stack that is not already defined in Azure

Azure Container Instances

  • "Azure Container Instances is a great solution for any scenario that can operate in isolated containers, including simple applications, task automation, and build jobs"
  • A fast, light-weight and easy way of running containers Billed for the time your container is active (billing is based on seconds, cores and memory)
  • Can start containers in Azure in seconds, without the need to provision and manage VMs.
  • Can also work with Kubernetes through an experimental ACI to Kubernetes connector
  • Currently, the fastest way to deploy containers on Azure
  • Based on the Azure docs, " Azure Container Instances guarantees your application is as isolated in a container as it would be in a VM."
Dentist answered 10/2, 2021 at 12:55 Comment(0)
O
5

There is a good article about this on Microsoft Learn called: Comparing Container Apps with other Azure container options

Azure Container Instances

Azure Container Instances (ACI) provides a single pod of Hyper-V isolated containers on demand. It can be thought of as a lower-level "building block" option compared to Container Apps. Concepts like scale, load balancing, and certificates are not provided with ACI containers. For example, to scale to five container instances, you create five distinct container instances. Azure Container Apps provide many application-specific concepts on top of containers, including certificates, revisions, scale, and environments. Users often interact with Azure Container Instances through other services. For example, Azure Kubernetes Service can layer orchestration and scale on top of ACI through virtual nodes. If you need a less "opinionated" building block that doesn't align with the scenarios Azure Container Apps is optimizing for, Azure Container Instances is an ideal option.

Azure App Service

Azure App Service provides fully managed hosting for web applications including websites and web APIs. These web applications may be deployed using code or containers. Azure App Service is optimized for web applications. Azure App Service is integrated with other Azure services including Azure Container Apps or Azure Functions. When building web apps, Azure App Service is an ideal option.

Azure Web App for Containers and Azure Web App is the same service and they use an App Service Plan. The only difference is that Publish is set to Docker Container instead of Code by default.

https://azure.microsoft.com/en-us/products/app-service/web/

https://azure.microsoft.com/en-us/products/app-service/containers/#overview

enter image description here

enter image description here

From the article to see other alternatives as well:

There are many options for teams to build and deploy cloud native and containerized applications on Azure.

  • Azure Container Apps
  • Azure App Service
  • Azure Container Instances
  • Azure Kubernetes Service
  • Azure Functions
  • Azure Spring Apps
  • Azure Red Hat OpenShift

Azure Container Apps

Azure Container Apps enables you to build serverless microservices based on containers. Distinctive features of Container Apps include:

  • Optimized for running general purpose containers, especially for applications that span many microservices deployed in containers.
  • Powered by Kubernetes and open-source technologies like Dapr, KEDA, and envoy.
  • Supports Kubernetes-style apps and microservices with features like service discovery and traffic splitting.
  • Enables event-driven application architectures by supporting scale based on traffic and pulling from event sources like queues, including scale to zero.
  • Support of long running processes and can run background tasks.

Azure Container Apps doesn't provide direct access to the underlying Kubernetes APIs. If you require access to the Kubernetes APIs and control plane, you should use Azure Kubernetes Service. However, if you would like to build Kubernetes-style applications and don't require direct access to all the native Kubernetes APIs and cluster management, Container Apps provides a fully managed experience based on best-practices. For these reasons, many teams may prefer to start building container microservices with Azure Container Apps.

You can get started building your first container app using the quickstarts.

Azure Kubernetes Service

Azure Kubernetes Service (AKS) provides a fully managed Kubernetes option in Azure. It supports direct access to the Kubernetes API and runs any Kubernetes workload. The full cluster resides in your subscription, with the cluster configurations and operations within your control and responsibility. Teams looking for a fully managed version of Kubernetes in Azure, Azure Kubernetes Service is an ideal option.

Azure Functions

Azure Functions is a serverless Functions-as-a-Service (FaaS) solution. It's optimized for running event-driven applications using the functions programming model. It shares many characteristics with Azure Container Apps around scale and integration with events, but optimized for ephemeral functions deployed as either code or containers. The Azure Functions programming model provides productivity benefits for teams looking to trigger the execution of your functions on events and bind to other data sources. When building FaaS-style functions, Azure Functions is the ideal option. The Azure Functions programming model is available as a base container image, making it portable to other container based compute platforms allowing teams to reuse code as environment requirements change.

Azure Spring Apps

Azure Spring Apps is a platform as a service (PaaS) for Spring developers. If you want to run Spring Boot, Spring Cloud or any other Spring applications on Azure, Azure Spring Apps is an ideal option. The service manages the infrastructure of Spring applications so developers can focus on their code. Azure Spring Apps provides lifecycle management using comprehensive monitoring and diagnostics, configuration management, service discovery, CI/CD integration, blue-green deployments, and more.

Azure Red Hat OpenShift

Azure Red Hat OpenShift is jointly engineered, operated, and supported by Red Hat and Microsoft to provide an integrated product and support experience for running Kubernetes-powered OpenShift. With Azure Red Hat OpenShift, teams can choose their own registry, networking, storage, and CI/CD solutions, or use the built-in solutions for automated source code management, container and application builds, deployments, scaling, health management, and more from OpenShift. If your team or organization is using OpenShift, Azure Red Hat OpenShift is an ideal option.

Orpheus answered 3/10, 2022 at 9:2 Comment(0)
E
4

Another difference, in addition to the other answer, is that Web App for Containers offers "slots" with which you can run multiple images on the same allocated resources to help increase utilization. As container instances bill per time used, they do not have "slots".

Elayne answered 3/11, 2020 at 17:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.