Azure Service Fabric - Introduction To Microservices And Azure Service Fabric - Part One

This article details basic concepts of Microservices and Azure Service Fabric. The details provided will help build deeper concepts in Azure Service Fabric in the next set of articles in the series

Introduction

Microservice is being adopted widely while building modern applications. This facilitates building the entire application as a collection of single functional services that can interact with each other and achieve the business vision. Azure Service Fabric helps in building applications confirming to Microservices architecture.

In this series, we will start with a basic understanding of Microservices and Azure service fabric. Then we will get into different programing models supported by Azure Service Fabric followed by configuring, implementing, hosting and scaling techniques in the next set of articles in this series. By the end of this series, one can expect to gain enough context of Azure Service Fabric and can build a production-ready Service Fabric application.
 

Understanding Monolithic Applications and Microservices-Based Applications

Monolithic Applications are multi-tiered applications. Each of the layer or component is tightly coupled. Scale-out is possible by creating multiple instances of the application. As these applications are tightly coupled each of the application components has a strong dependency on others.

In Figure 1 we have a Presentation layer that interacts with the Business layer. Business layer consists of tightly-coupled subcomponents like Accounts, Sales, and Inventory. Business layer interacts with Data Access Layer and Data Access Layer interacts with the Database. Each of these layers is tightly coupled as seen here.

Introduction To Microservices And Azure Service Fabric 

Microservices are a collection of independent functional modules that are capable of interacting with each other. Each of the modules is capable of achieving a unit of business functionality and together they can fulfill the business vision. These services are loosely coupled and hence they can scale out and be versioned independently as they do not depend on each other.

Figure 2 demonstrates Microservices based application. Here, we have the Presentation service, Account service, Sales service, and Inventory service. Each of these services is independent of each other and also interact with own their instance of database. There can also be a Data Access service for each of these service and Data Access Service can talk to the database instead of these services directly.
 
Introduction To Microservices And Azure Service Fabric
 

Understanding Azure Service Fabric

Microsoft Azure Service Fabric provides the necessary mechanism to build Microservices-based applications. Under the hood it facilitates the below capabilities.

  • Provides necessary APIs to build Microservices applications
  • Manages state for the services in the Microservices applications
  • Provides hosting mechanism for Microservices based applications
  • Handles scaling out for independent services in the Microservices application
  • Guarantees High Availability by spinning out a new service instance for the Microservices application when one of the instance goes down
  • Provides mechanism to monitor node and service instance health
  • Helps in managing life cycle of Microservices application using a feature rich and intuitive dashboard.
  • Provides all that is needed to build, manage and deploy Microservices based application.

Azure Service fabric-based applications can be hosted on Windows or Linux-based platforms or containers. They can be hosted on Azure or on premises or other cloud providers. They are capable of scaling out to thousands of instances based on load.

Winding up

This article provided a basic introduction to Microservices architecture and Azure Service Fabric. In the next article we will explore different programming models supported by Azure Service Fabric application.