Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure Container Instances vs Azure Functions

When would I prefer Azure Functions to Azure Container Instances, considering they both offer the possibility to perform run-once tasks and they bill on consumption?

Also, reading this Microsoft Learn Module:

Serverless compute can be thought of as a function as a service (FaaS), or a microservice that is hosted on a cloud platform.

like image 491
Alberto Avatar asked Apr 19 '20 10:04

Alberto


2 Answers

Azure Functions is a platform that allows you to run plain code (instead of containers). The strength of Azure Functions is the rich set of bindings (input- and output bindings) it supports. If you want to execute a piece of code when something happen (e. g. a blob was added to a storage Account, a timer gets triggered, ....) then I definitely would go with Azure Functions.

If you want to run some container-based workload for a short period of time and you don't have an orchestrator (like Azure Kubernetes Services) in place - Azure Container Instances makes sense.

like image 91
Martin Brandl Avatar answered Sep 25 '22 01:09

Martin Brandl


Take a look at this from Microsoft doc

enter image description here

Source: https://docs.microsoft.com/en-us/dotnet/architecture/modernize-with-azure-containers/modernize-existing-apps-to-cloud-optimized/choosing-azure-compute-options-for-container-based-applications

like image 33
sean717 Avatar answered Sep 22 '22 01:09

sean717