Getting Started With MicroServices

Most of us have heard the term microservice. In this article we are going to learn what microservice is, the existing architecture we are using, the problem in the existing architecture, and the advantages of microservice.

What is Microservice?

Microservice is a new architectural style. A collection of small services forms an architecture called microservice architecture. Each and every service has its own business logic deployed independently and may run independently. In the microservice architecture, the services communicate through the API only.

The basic idea of microservice is to split the application into small services and run them independently.

Diagram

Microservice

Why Microservice?

  1. Faster than monolithic architecture
  2. If one of the services fails another will run
  3. No need to take down the entire application for the deployment
  4. Technology Independent (i.e. front end may be developed in angular and the backend service may developed in .net or any other technology.)

Existing Architecture?

Most of the companies/developers use Monolithic Architecture. Monolithic Architecture is single-tier architecture, which means all the backend logic and the frontends are in a single environment.

Diagram

Existing Architecture

Problems in Monolithic Architecture

  1. It may slow down the application when the application size increases.
  2. Need to take down the entire application during the deployment.
  3. The developer may have difficulty in continuous deployment.
  4. If a small piece of code changes in the application the developer needs to redeploy the entire application.
  5. Monolithic application is tightly coupled.

Advantages in Microservice

  1. Independent deployment. So there is no need to take down the entire application.
  2. If any one of the services fails another one will run without any issue.
  3. The service may be written in different languages.
  4. It enables continuous delivery.
  5. Increase application performance.
  6. Dockerization and containerization are possible.
  7. The service may run on different servers.

I hope this article may help you to understand the basic idea of Microservice architecture.

Learn more here: Build Microservices using ASP.NET Core