Maybe you’re heard of the Azure Service Fabric (or maybe not), but WHY would you choose to develop a Services Fabric app? Web Apps seem fine, don’t they?
Microservices is a relatively new thing on the cloud computing scene, and it’s the newest way to develop an application that is most easily scalable and near-perfect availability.
Before we get into that, how did we get here?
Traditionally, many large enterprises maintained their own server hardware on site. This involved up-front and ongoing investment in those data centers which included securing the building premises, providing power and cooling, purchasing backup generators, UPS and HVAC units, acquisition of equipment like servers, routers, switches, cabling, patch panels, rack units etc., dedicated technical personnel to maintain the data centers. Some of the disadvantages of this model were a lot of time and effort involved in provisioning new services, over-provisioning, planning ahead of demand, the time required to acquire new infrastructure. All this made the process of hosting time consuming and cumbersome. Also, this was often a roadblock for companies whose core business was not IT.
With the advent of cloud computing, enterprises now have the option to host their IT infrastructure and applications over the cloud with much more ease and simplicity. They can get rid of the burden of building and maintaining their own data centers to host their services and application thereby freeing up resources and time to focus on their core business. Some of the major players in cloud computing are Microsoft Azure, Amazon Web Service (AWS), Google Cloud, Century Link, Rackspace etc. Some of the key services offered by these players include Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS).
Platform as a Service (PaaS) offers customers to directly deploy their applications onto the cloud without having to deal with the underlying infrastructure layer over which your applications are hosted on. Azure is fabric is a PaaS service offered by Microsoft Azure. Service Fabric provides several features to the applications deployed like high availability, backup, disaster recovery, scalability, high performance all of which will be taken care of by the respective cloud service provider thereby allowing you to concentrate on the application part.
Azure Service Fabric is a distributed systems platform which helps you to package, deploy and manage scalable and reliable app services and also addresses the significant challenges in developing and managing cloud applications. By making use of Azure Service Fabric, app developers and administrators can avoid dealing with complex IT infrastructure problems and focus instead on implementing mission critical, demanding workloads which are highly scalable, reliable and manageable. It represents the middleware platform for building and managing next-generation, enterprise-class cloud-scale applications. Azure Service Fabric provides a host of services including life-cycle management, independent scaling, rolling upgrades, always-on availability.
Azure Service Fabric is not limited only to the Azure platform. You can deploy and use it on any public cloud (AWS or Google etc.), your own on-premises private cloud. For developers, there is SDK for Azure Service Fabric which you can install on your machine and get the same features. Service Fabric helps you build applications with any of the languages, frameworks or runtimes of your choice.
Azure Service Fabric comes free of cost. There is no charge for Azure Service Fabric components. However, in case you are using Azure Service Fabric within the Azure cloud, you will be charged for the virtual machines that you are using.
The figure above illustrates some major advantages of Azure Service Fabric over Azure cloud service. With Azure Service Fabric, you don’t have to pay for dedicated instances thereby saving costs. Also, it provided faster scaling and takes care of the upgrades.
The way Azure Service Fabric works is you deploy the Service Fabric on a bunch of nodes (read VM’s) which forms a cluster. When you deploy your code theoretically it gets deployed on each of the nodes in the cluster.
The table below lists some of the Azure Service Fabric infrastructure services which would be running on each of your nodes within the cluster along with the function they should be performing:
Azure service manager offers high availability built-in as compared to Cloud Service wherein you have to manually specify the number of worker and web roles to manage high availability. This is achieved with the help of failover manager. Failover manager keeps a track of the nodes and what services they are running. The moment a particular node goes down it identifies the services which it was running and try to bring them up on other nodes.
Another important reason why you should be choosing Service Fabric over traditional offerings is it reduces your maintenance effort and costs. You do not have to take care if your underlying infrastructure is up-to-date with latest patches. The upgrade service takes care of it. Time and now the Service Fabric team keeps on upgrading its various components. The upgrade service takes care that all nodes have the latest update running.
Azure Service Fabric offers better and optimized use of the hardware resources. The nodes that you deploy the Service Fabric on can be simultaneously used for hosting instances for different tenants and various services. This is a shift and advantage over the traditional cloud service offering wherein you had to dedicate VM’s to host services for a particular tenant. Azure Service Fabric with built-in services takes care of the load sharing part between the instances making sure you get the best possible performance for your application.
There are three ways to administer Service Fabric via REST API, PowerShell and fabric client (.net class). Applications hosted over the Azure Service Fabric are much more easy and faster to scale. Whereas in traditional offering it would take about 15-30 minutes to scale up or down a particular number of instances in Azure Service Fabric it’s just a matter of seconds to increase or decrease the number of instances. This offers much more scalability to the application administrators to scale up or down their applications to meet the ever-changing demands. Azure Service Fabric provides a detailed health check and monitoring system wherein it can check and monitor each of its entities like clusters, nodes, applications, services, deployed service packages, partitions, instances etc. giving a greater in-depth look inside your system to detect any faults or performance issues. When you query the health of an entity it gives you the aggregated health of the entity and all its child descendants thus providing you with a better visibility.
For application upgrades, Azure Service Fabric uses a technology called “upgrade domains” wherein you can perform in-service application upgrades wherein the customer can keep hitting your application while the upgrade is in progress. This is achieved by segregating your instances into upgrade domains (UD). You go about upgrading one upgrade domain while the instances in other upgrade domains continue to serve your application to the customer. Once this UD is successfully upgraded you move onto another UD. The more the number of upgrade domains the greater scalability you can achieve.
So the next time you want to host your application onto the cloud, have a look at Azure Service Fabric with all of the features and services it has to offer. It might make your life easier.