Dajbych.net


What is Service Fabric Mesh?

, 3 minutes to read

service fabric mesh logo

Microsoft has recently introduced a Service Fabric Mesh service. It is a container orchestration service like Kubernetes. The name suggests that it has something in common with Service Fabric. When you want to migrate a classical service, you can consider Service Fabric Mesh. However, this is not true for native Service Fabric services. Service Fabric Mesh is more about tooling automation and hosting offerings than technological features.

Difference between Service Fabric & Service Fabric Mesh

In general, Service Fabric is PaaS (platform as a service) while Service Fabric Mesh is IaaS (infrastructure as a service). Yes, both have ASP.NET Core app templates in Visual Studio, but it does not mean that the underlying services are almost the same. Service Fabric Mesh provides Docker Container Engine while Service Fabric provides Service Fabric Runtime. It looks like Service Fabric Mesh is completely different from Service Fabric because one hosts Docker images and the other Service Fabric Applications, but both services share the same orchestration layer. Configuration is practically identical, but Service Fabric uses XML format and Service Fabric Mesh uses JSON format.

Traditional Service Fabric is a layer above virtual machine scale sets. The benefit of this solution is that Service Fabric can be deployed in an on-premises environment. Service Fabric Mesh is a standalone Azure service optimized for scaling Docker containers.

Service Fabric Mesh has a huge disadvantage compared to Service Fabric. It does not support Reliable Collections. This means that Service Fabric Mesh is not a successor to Service Fabric because you cannot migrate Service Fabric applications to Service Fabric Mesh. You can migrate only those that host a container.

Difference between Service Fabric & Kubernetes

From the orchestration point of view, these services are very similar. On the other hand, when we consider containerization, these services are very different. Kubernetes has some disadvantages. It does not support rebalancing (moving the service from one machine to another depending on workload) or health monitoring during the deployment of an app upgrade. Both Service Fabric and Kubernetes are designed for hosting containers, help to avoid vendor lock-in, are open source, and can run on Windows or Linux. In general, Service Fabric is PaaS while Kubernetes is IaaS.

Service Fabric offers more features than Kubernetes. When you wish to use an actor model, you can choose the Service Fabric Reliable Actors framework. Kubernetes does not support this directly, so you must find and pick another framework that covers this need.

Service Fabric offers reliable collections, which is a distributed object database integrated into your cluster. Kubernetes has its Persistent Volumes, but it is not guaranteed that data will be on the same VM as the running process, so the latency can be very high.

Service Fabric’s architecture is more decentralized compared to Kubernetes. Service Fabric cluster’s VMs can be spread across multiple datacenters, while Kubernetes is not designed for this scenario.

Difference between Service Fabric Mesh & Azure Kubernetes Service

There is almost parity between these services. Both can host Docker containers, and the state is maintained in the volume. Service Fabric Mesh (SFM) has Service Fabric Reliable Disk or Azure Files Volume, and Azure Kubernetes Service (AKS) has Volumes. The advantage of SFM is that it supports storing the state reliably on the local disk, while AKS supports storage outside the cluster only. Both services depend heavily on IDE tooling and cloud provider’s services.