Congratulations you have chosen Azure to be (one of) your Cloud provider(s) and there is a NEW application that needs to be hosted. You know that Azure has many hosting solutions for your new application, but which one to choose? This article is trying to guide you in todays (June 2020) most considered application hosting solutions on Azure: WebApps, Functions or AKS.
Hosting the application on a VM is also an option but is not being considered as taking maximum advantage of the available cloud benefits. VM hosting is not within the scope of this article.
For existing workloads have a look at this for guidance; please be aware that the flow is a start but not as binary as it would suggest.
Summary
With (full) PAAS offerings like Azure Webapps and Azure Functions you make optimal use of the Cloud Benefits. Although you have a Pay as You go model there is a price tag for all the functionality you get out of the box. Although the PAAS offerings try to have a non opinionated technology stack the implementation is done according to the best practices of Microsoft and will never be as open and flexible like the open source solutions.
Hosting on a (semi-paas) container solution like AKS, can be considerably cheaper initially. However customer responsibility and operational costs are higher than solutions based on Webapps and Functions. Container solutions give a higher flexibility but do not come with standard solutions like Application authentication out of the box. In general more skills are required from the Developers and Operators maintaining the Containerised solution(s) on the other hand you have a very flexible platform that is based on the latest open source standards.
There is no right or wrong here, only what is suitable to you. When making a decision try to make it an educated one, the decision matrix below could be a start for your journey.
Hosting options
To have a better understanding of the products a short description of the product and its features is given. Intention is to give a quick overview, more information can be found in the links provided.
Azure Web apps
WebApps gives you a platform to host your applications based on an underlying runtime stack, for eg: Tomcat on linux for nodejs and python based workloads.
This platform is linked to an App Service Plan which gives you a set of features and capabilities.
There are 3 major SKU types for WebApps:
Within one of the SKU types you can select a tier which has impact on the specifications and specs:
With Azure Webapps you do not have to worry about setting up and maintaining an infrastructure for your applications.
Short summary of operational concerns:
Other important features are the KUDU toolkit for version management and integration with CI/CD tooling and Deployment slots for deploying new releases in a blue/green scenarios.
Azure Webapps provides the functionality of hosting containers as well, but (my opinion) that makes no sense as Azure Webapps is not designed to be a container orchestrator or scheduler.
The AWS alternative to Azure Webapps is Elastic Beanstalk. For more information, please have a look at the documentation.
Considered by many as the holy grail of modern application hosting. Azure Functions is also referred as Serverless technology, the idea is to abstract the Server (infra) away and put the main focus on the function(s) of your app.
Azure functions shines in scenarios where you need event driven architectures. It is (in general) not used for hosting long running (stateful) applications.
Azure functions is often used in conjunction with an (process) orchestrator like Azure Logic Apps. Below are some well known scenario's for Azure Functions:
Two concepts are essential in the usage of Azure Functions: Trigger and Bindings.
A Trigger is an event that is responsible for the start of a the execution of a Function; example of triggers are:
Bindings are links to the data used within the function.
There are Input Bindings and Output Bindings, an example of an InputBinding could be a message on a queue and the output could be a transformed message that will be persisted in a database using an output binding.
Short summary of operational concerns:
Cost efficiency is a major factor for using Azure Functions.
While with other platforms you are paying for the usage of the underlying hosting platform, with Azure functions you do not. Azure Functions provides the concept of Micro Billing, with micro billing you only pay for the actual usage of the function.
The AWS alternative to Azure Functions is Lambda. For more information, please have a look at the documentation.
Container technology has made a tremendous growth in usage and adaption the last 5 years. With Kubernetes on the forefront of hosting container workloads it has an enormous following and the fanbase is growing. Azure provides hosting of container workloads through several services but Azure Kubernetes Service (AKS) is by far the fastest growing service at the moment.
An alternative with most of the functionalities is Azure Redhat Openshift (ARO), this is considered an opinionated version of managed Kubernetes. It is implemented according to the best practices of Redhat. ARO uses Red Hat Enterprise Linux CoreOS in stead of Ubuntu (debian based), which is used by AKS . ARO is a collaboration between Microsoft and Redhat, ARO is more expensive than AKS but provides more support on the Operating System and Openshift (opinionated Kubernetes) components.
AKS is a semi PAAS offering; Simply put Kubernetes consists of 2 components:
The managed component is a PAAS offering which is free of use; depending if you choose to have a SLA. The worker nodes are the compute power and is considered the IAAS solution for this offering.
However this is not fully true as the maintenance of the Operating System is executed by Microsoft, the customer is responsible for the reboot actions that might be needed, there are tools who can assist in this.
Upgrading the Kubernetes version itself is very easy but must be initiated by the customer.
Microsoft has put all effort in to make maintenance of this shared responsibility platform as easy as possible.
Once this platform is UP and running it provides an enormous flexible platform that can host almost all open source based solutions like: Apache Flink and ElasticSearch. AKS even supports hosting Windows containers.
Short summary of operational concerns:
Kubernetes and thus AKS is also suitable to host event driven solutions. You can host Azure functions on your AKS cluster but it does not have the micro billing feature like Azure Functions does as it is still hosted on a VM under water. With KEDA though you can have the scaling features as a function call will spin up a new pod and the autoscaling features of AKS will taker over.
The AWS alternative to Azure Kubernetes Service is Elastic Kubernetes Service. For more information, please have a look at the documentation.
Decision Matrix
Benefits | Features |
Costs |
= Fully Managed | + = Limited |
$ = Affordable |
= Partially Managed | ++ = OK |
$$ = Mid Priced |
= Self Managed | +++ = Excellent | $$$ = Premium |
WebApps | Functions | AKS |
Remark |
|
Scalability | ||||
Availability | ||||
Security | AKS does not support out of the box application security | |||
Monitoring | Integration with Azure monitor | |||
CI/CD support | ||||
Maintenance: Patches/ Updates | OS updates/upgrades are managed, reboots are not. K8 updates/upgrades are initiated by customer, supported tooling makes it easy. | |||
Support for different apps | ++ | + | +++ | Functions only for certain scenario's. Webapps supports more hosting scenarios, AKS supports almost everything |
Deployment strategies | ++ | ++ | +++ | Though not out of the box, but K8 can supports all types of deployment strategies: Recreate/ Canary/ Blue Green/ Shadow etc etc |
Integration with other Azure PAAS services | +++ | +++ | +++ | AKS uses the Open Service operator to integrate with other Azure Paas services |
Unit Costs | $-$$$ | $ | $ | Webapps, Premium is ASE or high prod SKU. AKS you pay only for the required nodes. see calculator |
Operational costs | $ | $ | $$ | Initially ramping up and educating will be more effort for AKS. Also more operational work is required |
Hosting |
SKU |
Specs |
Price per month in USD |
WebAPP |
Standard |
AustraliaEast, S3, 4 cores, 7 GB RAM, 50 GB Storage |
350 |
ASE |
|
AustraliaEast, L2 2 cores, 7 GB |
1,933.04 |
Functions |
Consumption |
AustraliaEast, 1.5GB, exec time 2 sec, 1.000.000 calls |
41.60 |
Functions |
Premium |
AustraliaEast, 1 Pre warmed + 1 Scaled out unit 2 Cores 7 GB |
664,30 |
AKS |
|
AustraliaEast, D2v3 8Gb x 2 nodes |
182,50 |
This table just gives you a bit of an idea of the costs of hosting your app on Azure; this is based on the Price calculator in Juli 2020.
Please be aware that you need to consider the features, benefits and operational costs especially if you are scaling out.
Links:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.