Click here to Skip to main content
15,885,032 members
Articles / Hosted Services / Azure

A Quick Introduction to Azure Service Fabric

Rate me:
Please Sign up or sign in to vote.
3.86/5 (4 votes)
24 Nov 2018CPOL4 min read 7.5K   3  
The evolution from monolithic apps to microservices

Azure Service Fabric

Azure Service Fabric is Microsoft’s platform-as-a-service (PaaS) and is used to build and deploy microservices-based cloud applications. However, before we can understand Azure Service Fabric, it’s important that we understand the evolution from monolithic apps to microservices-based apps.

Image 1

Background - Monolithic Apps vs Microservices

Prior to microservices, most applications were built with the app’s functionalities tightly coupled into one service. This monolithic approach has a number of disadvantages, including long downtimes when new features are being deployed, scaling is slow and expensive, and availability and reliability are achieved through hardware redundancy, which is both complex and expensive. These disadvantages are of increasing importance when it comes to the current cloud era, where time-to-market and ability to scale are more important than ever.

  1. A monolithic app is normally divided into functional layers, such as web, business and data.
  2. A monolithic app is scaled by cloning it on, for example, multiple virtual machines (VMs).
  3. With a microservice application, you separate functionality into smaller, modular services.
  4. A microservices app scales out by creating instances of these services across VMs or containers.

In contrast to the monolithic app approach, microservices-based apps are split into sets of small, loosely coupled services. Each one is independently versioned and scalable, and the services communicate with each other over standard protocols and well-defined interfaces. Using the microservices approach to app building means that each service can be updated and scaled independently of each other. This in turn improves agility and efficiency. The majority of Internet-scale services are made up of microservices, including protocol gateways, user profiles, shopping carts, inventory processing, queues, and caches. However, these microservices need code for inter-service communications; for example, to deal with errors and failures and to report metrics. This is where Azure Service Fabric comes in.

Image 2

So What Actually Is It?

Azure Service Fabric is an open source project and is used in Azure infrastructure as well as other Microsoft services, including Azure Event Hubs, Azure Cosmos DB, Azure SQL DB, Dynamic 365 and Cortana. The major sub-sections of Service Fabric can be seen below:

Image 3

Service Fabric is a platform that makes it easier to build and deploy microservices-based applications, handling both stateful and stateless operations. It will run on any Windows system and there’s also a Linux version, which means that it’s portable across multiple cloud environments including Amazon Web Services, OpenStack and VMware.

Apps that are created in the Azure Service Fabric environment are made up of granular microservices, small chunks of code which are uploaded and run separately. These microservices communicate with each other using service application-programming interfaces (APIs). Because microservices are modular, it’s possible to scale each component of an app separately which simplifies the process of rolling out changes, in contrast to traditional monolithic architecture.

Service Fabric provides lifecycle management capabilities to microservice based applications. The microservices are hosted inside containers that are deployed across the Service Fabric cluster. Using containers instead of virtual machines means a massive increase in density and greater still density can be achieved by moving from containers to microservices in these containers. For instance, a single cluster for Azure SQL Database is made up of hundreds of machines running tens of thousands of containers that in turn host hundreds of thousands of databases. Each database is a Service Fabric stateful microservice.

Image 4

You can create clusters for Service Fabric on site, on Azure, on public clouds, on Windows Server or on Linux. The development environment in the software development kit (SDK) is exactly the same as the production environment. There are no emulators involved so what runs on your local development cluster can be deployed to the clusters in other environments.

For development being carried out on Windows, the Service Fabric .NET SDK is integrated with Visual Studio and Powershell. For Linux, the Service Fabric Java SDK is integrated with Eclipse.

Key Capabilities

The key capabilities of Service Fabric include being able to:

  • develop scalable applications that are made up of microservices, which can be stateless or stateful.
  • write code once and then deploy it to any Service Fabric cluster.
  • deploy applications quickly and at a high density.
  • upgrade applications independently.
  • monitor the health of your application and set policies for automatic repairs.
  • manage the life cycle of your applications without any downtime.

History

  • 24th November, 2018: Version 1

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Chief Technology Officer SocialVoice.AI
Ireland Ireland
Allen is CTO of SocialVoice (https://www.socialvoice.ai), where his company analyses video data at scale and gives Global Brands Knowledge, Insights and Actions never seen before! Allen is a chartered engineer, a Fellow of the British Computing Society, a Microsoft mvp and Regional Director, and C-Sharp Corner Community Adviser and MVP. His core technology interests are BigData, IoT and Machine Learning.

When not chained to his desk he can be found fixing broken things, playing music very badly or trying to shape things out of wood. He currently completing a PhD in AI and is also a ball throwing slave for his dogs.

Comments and Discussions

 
-- There are no messages in this forum --