A Beginner's Guide to Microservices

A Beginner's Guide to Microservices


3 min read


Microservices is a way of implementing distributed systems where finely grained services with their own life cycle collaborate together to work for a common goal. Since microservices are primarily modeled around business domains, they avoid all the problems that people encounter with traditional tiered architectures. Microservices also lets users incorporate the latest technologies which help them further by avoiding the pitfalls of many services-oriented architectures.

In a nutshell, microservices are small, autonomous services that work together to solve a business problem.

What are Monolithic Services?

In Greek, the term monolithic refers to a huge block of stone. In the context of software engineering, monolithic software refers to different components combined to a single program under a single platform. Normally, a monolithic software consists of components like databases, a client-side user interface, and a server-side application, and each of the functions is unified and maintained as one piece of software.

What are Microservices?

Microservices are nothing but tiny individual services that communicate over HTTP to solve a business problem. Microservices are not different from the traditional SOA, rather they are fine-grained SOA with small ephemeral components. As opposed to monolithic services, microservices use different technologies or programming languages, or databases for solving the domain problem. The below picture clearly depicts the difference between monolithic services and microservices.


Microservices over Monolithic Services:

Microservices are preferred over monolithic services for various different factors. Some of them are jotted down below. Ease of Deployment - Unlike monolithic, a bug or a change in any service doesn't necessarily affect the working of other services. Taking an online shopping portal for an example, any change in the billing module will not necessarily affect the module where users add products to their cart. Scaling - Scaling has been one of the primary benefits of using microservices. Let's suppose that the Instagram app is built on a microservice model, and all of a sudden the number of users posting the photos were doubled in a short period. Then scaling the microservice which accepts the photos and stores them in the DB alone can be scaled up rather than scaling them with other modules like videos, newsfeed, etc. Technology Heterogeneity - Rather than having a standard approach for all the components in an application like in a monolithic service, microservices give the users the liberty to choose a different programming language to solve different problems thus allowing the users to pick up the right tool for the right job.

Conclusion :

There is no doubt that microservices offer a lot of advantages to their users than monolithic services. But, microservices are no silver bullet for their users. Microservices always come with the complexity of managing and maintaining distributed systems. Though there are many proven techniques to handle a large-scale distributed system, they are still hard.