Microservice architecture is a self-contain process which offers unique business capabilities. Micro Services makes complex and large application deployment process easier.
But, before describing Microservice architecture in details we should first understand distributed technologies we already have in the industry.
Prior to Microservices, we have already Web Services, WCF Service and latest one from Microsoft i.e. ASP.Net Web API. Then Why Microservice Architecture?
You may read about all these distributed technologies in details in my earlier blog.
About Microservice Architecture
In this blog, we will focus on Microservices in details. What are Microservices? Why industry is moving towards Micro Services? What are the benefits of implementing Microservices? So, let’s start by knowing Microservices. With the growing technologies, IT industry is moving towards easy scaling, robustness solution and continuous deployment.
Microservices are a self-contain process which offers unique business capabilities. Micro Services makes complex and large application deployment process easier.
Essentially, microservice architecture is a process of developing software projects as a suite of small, independent services in which each service runs a unique process and communicates through a well-defined, lightweight mechanism to full-fill business need.
Watch this video on Microservice Architecture –
Let’s understand Microservices by exploring below topics.
- Definition of Microservice
- The issue with traditional application approach
- Microservice Architecture in details
- Why Microservice Architecture?
- Features of Microservice Architecture
- Microservices and SOA
- Example of Microservices in Industry
- Limitations and drawbacks of Microservice Architecture
- Microservices in Azure
- ASP.Net Core and Microservices
1. What is Microservice Architecture?
MicroService is an approach to break down large software into independent and loosely coupled modules where each module can communicate with each other.
Microservice is not a web microservice, it is a business logic microservice, a database logic service.
- Microservices are high-level architectural style and a variant of SOA to develop an application as a collection of loosely coupled services.
- Microservice is a method of developing software applications which are independently deployable, scalable and runs a unique process.
- Microservice application isolates functionality into smaller services.
- Microservices are one of the growing methods of developing software applications.
- Microservices scales out each service independently across multiple VMs.
2. The issue with traditional application approach
The monolithic application process can be scale up by deploying clones on multiple VMs. A traditional application development has all its functionality within a single roof.
Then what is the issue with that?
- As your application grows, your code, package, solution size also grow with it, which may cause issues like testing, integration, code analysis, deployment.
- If you are facing an issue in a particular module and planning to implement in a higher version then the complete solution will be affected and that is the too big risk. For eg – Your application is in .net framework 3.5 and for some reason, you want to use .net framework 4.5 for a single module because of easy implementation. This is not possible, you have to change the framework for your complete project and it is not easy.
- A single or a minor change requires the deployment of the complete application or that process which in turns include integration, testing, and deployment. This may cost more to deploy a minor change in a single module.
Here, MicroServices comes into the picture. Let’s understand this by below image.
In below image, each colored boxes represent a set of a process of logic.
In traditional application development, a process is a set of multiple logics. A change in a single logic for eg Credit or in Debit requires testing and deployment of full application which puts your production application at risk.
3. Microservice Architecture
As we know Microservices segregates the functionality into smaller services. Now, look at below image, each colored boxes are small services which run independently. In Microservice, scaling can be possible by deploying each service on multiple VMs with multiple instances.
4. Why Microservice Architecture?
Project scalability is the major challenge for every software project and Microservice made it easier.
Microservices could be a good choice to develop an application because of below reasons.
- Loosely coupled
- Independent and focused on the task
- Language neutrality
- Single or small distributed system
- Quick and Easy deployment
- Easy to understand the code
- Easy debugging
- Easy Scaling and integration with third-party API/service
5. Features of Microservice Architecture
- It consists of smaller services.
- Each service communicates with other services or processes using protocols like HTTP or HTTPS
- Each Microservice must be deployable independently.
- MicroServices can be scale-out independently i.e. scale-up what needed.
6. Microservice Architecture and SOA
SOA (Service Oriented Architecture) is all about a distributed system in a larger context whereas Micro Services offering distributed system in a smaller unit which runs independently. SOA is the standard that IT industry follows to develop a distributed application. Although SOA is a smart approach to develop distributed applications but SOA pattern lacks in cloud computing in the context of scaling, deployment.
7. MicroService Architecture used by brands
Netflix, eBay, Twitter, Amazon, Paypal are one of those large scale web applications which have already evolved from monolithic to Microservices architecture.
8. Limitations and drawbacks of Microservice Architecture
Although, Microservices have advantages over traditional monolithic approach but there are few drawbacks of Micro Services too.
- Multiple modules, component management can be a tedious task sometimes.
- Micro Service require more co-ordination and communication.
- Testing could be a little bit complex as the applications are distributed in a broader area
9. Microservice Architecture in Microsoft Azure Cloud
Microsoft Azure offers Azure Service Fabric which is a distributed platform to manage Microservices in the cloud. Azure Service Fabric makes it easy to package, deploy and scale Microservices. Azure Service Fabric provides a lightweight and sophisticated distributed build which is easy to scale in Azure Cloud environment.
I will focus on Azure Service Fabric in my upcoming blogs.
10. ASP.Net Core and Microservice Architecture
ASP.Net Core is a cross-platform open source framework for building modern applications including cloud-based development. In ASP.Net Core it is easy to implement Microservices architecture.
To know more about .Net Core, please visit .Net Core tutorial blog For .Net Core Interview Questions, visit this link - .Net interview questions and answers
Watch a flash video about Microservice.
If you like this blog on Microservice, then please like us on Facebook or subscribe this blog.
You may read some popular blogs on SharePointCafe.Net