MICROSERVICES

MICROSERVICES

To understand microservices, we must first understand what monolithic applications are and why we moved from monolithic architecture to microservices recently.

What is monolithic architecture?

A monolithic application consists of all functionality in one codebase. The downside to this approach comes if or when the application grows, requiring it to scale. If the entire application scaled, it's not really a problem. However, in most cases, a few parts of the application are the choke points that require scaling, whereas other components are used less.

No alt text provided for this image

But if we were using monolithic applications already, then what led us to microservices?

No alt text provided for this image

  1. With time, it become too large and difficult to manage.
  2. Even a small change requires a re-deployment of the entire application.
  3. Any new technology that is ideally suited for a certain purpose is particularly challenging to implement since it has an impact on the entire application in terms of both time and expense.
  4. As a single issue in any module might bring down the entire monolithic application, it is not very dependable.


What is Microservices?

Microservices is an architectural style in which an application is structured as a collection of small autonomous services based on a business domain. Each service operates independently and implements a single business capability.

No alt text provided for this image

Just as there is no formal definition of the term microservices, there’s no standard model that you’ll see represented in every system based on this architectural style. But most microservice systems share some common traits.

Microservices have many benefits for Agile and DevOps teams - as Martin Fowler points out, Netflix, eBay, Amazon, Twitter, PayPal, and other tech stars have all evolved from monolithic to microservices architecture.

How are Microservices Built?

Perhaps the cloud is the most critical component of the microservices architecture. Developers use Docker containers for packaging and deploying microservices in private and hybrid cloud environments. Earlier, developers used to package microservices in VM images but now typically use Docker containers for deployment on Linux systems or operating systems that support these containers.

What are the pros and cons of microservices?

Pros:

  1. Allows developers to create and use services on their own terms.
  2. Code for different services can be written in different languages.
  3. Simple integration and automatic deployment (using open-source continuous integration tools such as Jenkins, Hudson, etc).
  4. Developers can make use of the latest technologies.

Cons:

  1. Due to distributed deployment, testing can be difficult and time-consuming, which frequently reduces some of the scaling advantages of microservices.
  2. Additional complexity arises as the developers address fault tolerance, network latency, a variety of message formats, and load balancing.
  3. Handling use cases that span multiple services without using distributed transactions is not only difficult, but it also requires collaboration between different teams.

No alt text provided for this image

The future of Microservices

Recently, the impact of microservices on software development has been immeasurable. Teams now have a more efficient way to build, manage, deploy, and scale a variety of applications via the cloud thanks to this substitute for the monolithic architectural model that long predominated software development. Platforms like AWS and Azure facilitate this process.

Many web giants such as Twitter, Amazon, PayPal and Netflix have successfully adopted microservice architecture. Following their footsteps, other businesses are fast moving away from rigid monolith architectures to flexible microservice development processes.

To view or add a comment, sign in

More articles by Harsh Srivastava

Others also viewed

Explore content categories