What is Service Fabric Mesh?

, 4 minutes to read

Mi­crosoft has re­cently in­tro­duced a Ser­vice Fab­ric Mesh ser­vice. It is a con­tainer or­ches­tra­tion ser­vice like Ku­ber­netes. The name suggests that it has some­thing com­mon with Ser­vice Fab­ric. When you want to mi­grate a clas­si­cal ser­vice, you can con­sider Ser­vice Fab­ric Mesh. How­ever, this is not true for na­tive Ser­vice Fab­ric ser­vices. Ser­vice Fab­ric Mesh is more about tool­ing au­tom­a­ti­za­tion and host­ing of­fer­ings than tech­no­log­i­cal fea­tures.

Difference between Service Fabric & Service Fabric Mesh

In gen­eral, Ser­vice Fab­ric is PaaS (plat­form as a ser­vice) while Ser­vice Fab­ric Mesh is IaaS (in­fras­truc­ture as a ser­vice). Yes, both have ASP.NET Core app tem­plates in Vi­sual Stu­dio, but it does not mean that un­der­lay­ing ser­vices are al­most the same. Ser­vice Fab­ric Mesh pro­vides Docker Con­tainer Engine while Ser­vice Fab­ric pro­vides Ser­vice Fab­ric Run­time. It looks like Ser­vice Fab­ric Mesh is com­pletely dif­fer­ent from Ser­vice Fab­ric be­cause one hosts Docker im­ages and the other Ser­vice Fab­ric Ap­pli­ca­tions but both ser­vices share the same or­ches­tra­tion layer. Con­fig­u­ra­tion is prac­ti­cally iden­ti­cal, but Ser­vice Fab­ric use XML for­mat and Ser­vice Fab­ric Mesh use JSON for­mat.

Tra­di­tional Ser­vice Fab­ric is a layer above vir­tual ma­chine scale set. The ben­e­fit of this so­lu­tion is that Ser­vice Fab­ric can be de­ployed on on-premises en­vi­ron­ment. Ser­vice Fab­ric Mesh is a stan­dalone Azure ser­vice op­ti­mized for scal­ing Docker con­tainers.

Ser­vice Fab­ric Mesh has a huge disad­van­tage com­pared to Ser­vice Fab­ric. It does not sup­port Re­li­able Col­lec­tions. It means that Ser­vice Fab­ric Mesh is not a suc­ces­sor of Ser­vice Fab­ric be­cause you can­not mi­grate Ser­vice Fab­ric ap­pli­ca­tions to Ser­vice Fab­ric Mesh. You can mi­grate only those who hosts a con­tainer.

Difference between Service Fabric & Kubernetes

From the or­ches­tra­tion point of view these ser­vices are very sim­i­lar. On the other hand, when we are con­sider­ing con­tainer­iza­tion then these ser­vices are very dif­fer­ent. Ku­ber­netes has some disad­van­tages. It does not sup­port re­bal­anc­ing (mov­ing the ser­vice from one ma­chine to an­other de­pend­ing on work­load) or health mon­i­tor­ing dur­ing de­ploy­ment of the app up­grade. Both Ser­vice Fab­ric and Ku­ber­netes are de­signed for host­ing con­tain­ers, helps to avoid ven­dor lock in, are open source and can run on Win­dows or Linux. In gen­eral, Ser­vice Fab­ric is PaaS while Ku­ber­netes is IaaS.

Ser­vice Fab­ric of­fers more fea­tures than Ku­ber­netes. When you wish to use an actor model you can choose the Ser­vice Fab­ric Re­li­able Ac­tors frame­work. Ku­ber­netes does not sup­port this di­rectly, so you must find and pick an­other frame­work which covers this prob­lem.

Ser­vice Fab­ric of­fers re­li­able col­lec­tions which is a dis­tributed ob­ject database in­te­grated into your clus­ter. Ku­ber­netes has its Per­sis­tent Vol­umes but it is not guar­an­teed that data will be on the same VM as the run­n­ing pro­cess so there the la­tency will be very high.

Ser­vice Fab­ric’s ar­chi­tec­ture is more de­cen­tral­ized com­pared to Ku­ber­netes. Ser­vice Fab­ric clus­ter’s VMs can be widespread among mul­ti­ple dat­a­cen­ters while Ku­ber­netes is not de­signed for this sce­nario.

Difference between Service Fabric Mesh & Azure Kubernetes Service

There is al­most a par­ity be­tween these ser­vices. Both can host Docker con­tain­ers and the state is main­tained in the vol­ume. Ser­vice Fab­ric Mesh (SFM) has Ser­vice Fab­ric Re­li­able Disk or Azure Files Vol­ume and Azure Ku­ber­netes Ser­vice (AKS) has Vol­umes. The ad­van­tage of SFM is that it sup­ports stor­ing the state re­li­ably on the lo­cal disk while AKS sup­ports stor­age out­side the clus­ter only. Both ser­vices de­pend heav­ily on IDE tool­ing and cloud provider’s ser­vices.