Azure Service Fabric and the new Azure Container Service (AKS) are both great container orchestration services on Azure. Which one is currently the best to start using? That’s what I was wondering so I looked up some facts. Let me preface this article by saying that Service Fabric actually has several use-cases. For example it has a comprehensive programming model that is very well suited to create microservices. These services can then be orchestrated as a cluster by Service Fabric. However, it is also possible to let Service Fabric orchestrate your containers and that is the only part I’m talking about here because it is the only part that is comparable to Azure Container Service (AKS). So if you still have to build your (micro)services, then do look into the complete Service Fabric offering. If you’re looking for which container orchestration service to use on Azure then this article might help you a bit.
If you’re not yet familiar with AKS you may be thinking it doesn’t make sense as an abbreviation for “Azure Container Service”, and that’s correct. The “K” actually stands for Kubernetes, which is what this service is actually about; managed Kubernetes on Azure.
What they both do
Just in case you’re not really familiar with either of these services. Also this is not the complete list, but I feel like these are worth mentioning.
- They coordinate a cluster of computers (nodes) connected to work as a single unit. This means you just deploy to the cluster and it will take care of running it on the node that is currently best suited for it
- They provide high availability for your application. In other words, they make sure your app is always running. If your app is running on a certain node and that node fails, the cluster will spawn your app on a different node
- They allow you to scale your apps very easily. Your cluster can’t handle the load? Just add a couple more nodes
- They re-balance your nodes based on resource consumption. Two apps running on a node and they get into a “this node ain’t big enough for the both of us” dispute? The cluster is the sheriff that will end the fight and send one of them to another node. But there’s also another side; have an extra node that isn’t doing much? Might as well spawn an instance of another app on there to optimally use your resources
- They enable you to upgrade your apps without downtime by temporarily running your app on another node while it is being updated
- They monitor the health of your apps and restart them when necessary
- They allow you to apply resource governance to your apps so you can limit the amount of resources a certain app can use on a node
- They give you a complete cluster and container orchestration platform on Azure for free, you only pay for the nodes (Azure VMs) in the that are being used by the cluster
What’s different in Azure Service Fabric
- It supports Windows containers. AKS only supports Linux containers, so you don’t really have a choice if you want to lift-and-shift some legacy .NET applications to containers and the cloud. Now if you’re reading this, it’s important to look at the time of writing of this article, because Windows containers support is also expected on AKS around Q2 of 2018
- It’s already a first-class Azure service, meaning you have all the standard tools available to you such as the Azure CLI, Powershell, REST API etc. And the Azure Portal can be used to configure many things in your cluster. Again it should be noted that AKS is aiming to become a similarly complete Azure service in the future
- It has great tooling in Visual Studio 2017. With a few clicks you can set up your Service Fabric container package, complete with configuration files and a deployment script. And you can then deploy it to your cluster right from Visual Studio just as easily
What’s different in Azure Container Service (AKS)
- It’s based on the open source Kubernetes, so you can expect quick fixes to issues and other benefits from community involvement. Also, Kubernetes is built upon over a decade of experience of running production workloads at Google and let’s face it; they need highly available and highly scalable systems
- The configuration is a bit more complex because you have to define all components in your cluster such as load balancers and endpoints. In Service Fabric more of it is done for you automatically. However, this also means in AKS you can have a more fine-grained configuration
Which one to choose?
Honestly, it depends on when you are reading this article. At the moment AKS is still a preview, which is why it is not as complete of an Azure service as Service Fabric. However, this is going to change rapidly. All things I wrote about what’s different in Service Fabric will eventually also be implemented for AKS. Kubernetes is an industry standard container orchestrator. Meanwhile Service Fabric is a microservices framework that also features orchestrating containers instead of services made with the framework. If you’re looking for the right Azure service to host your container cluster, choose AKS. If you’re planning to build a microservices application from scratch, do look into Service Fabric’s programming model because it’s pretty great, but my personal recommendation would be: create your microservices using .NET core and run them in Linux containers on AKS.
Recente reacties