You are on page 1of 8

Microservices

What is a Microservice?
Microservices are a software development technique—a variant of the service-oriented architecture
(SOA) architectural style that structures an application as a collection of loosely coupled services...

In a microservices architecture, services are fine-grained...

The benefit of decomposing an application into different smaller services is that it improves modularity.
This makes the application easier to understand, develop, test, and become more resilient to architecture
erosion.[1]

It parallelizes development by enabling small autonomous teams to develop, deploy and scale their
respective services independently.[2]
What is a Microservice
- A Web Service
- Small and Responsible for one thing (Search, Password Reset, Email
Verification)
- Configured to work in the Cloud and is easily scalable
Microservice vs Monolithic Application
Monolithic Application Microservices

Spring Boot, Spring MVC Users Web Service


Users Controller

Spring Boot, Spring MVC Addresses Web Service


Addresses Controller

Jersey 2, JAX-RS Products Web Service


Products Controller

Search Controller PHP Search Web Service

Email Verification Controller Email Verification Web


Service
Mobile Device Web Browser

Cloud HTTP Request

API Gateway
Load Balancer

Config Server Service Discovery HTTP

HTTP

Products Products Search Search


Users Microservice
Microservice Microservice Microservice Microservice

HTTP

HTTP
Checkout Checkout Notifications
Microservice Microservice Microservice
Users
What is a Microservice Rest Controller #1

Service #1
- RESTful Web Service Repository #1
- Small and Responsible for one thing (Search,
Password Reset, Email Verification) Addresses
- Configured to work in the cloud
Rest Controller #1

Service #1

Repository #1

Search

Rest Controller #1

Service #1

Repository #1
Rest Controller #1

Rest Controller #2
Monolithic Application Rest Controller #3

Rest Controller #4
Advantages:
Rest Controller #5

...
● It is easier to to begin with, Rest Controller #50
● Faster initial development time,
● Easier to deploy 1 app, than 20 independent Service #1
apps.
Service #2

Service #3
Disadvantages:
Service #4

Service #5
● Harder to maintain, harder to release changes, ...
● Difficult for new developers to understand,
Service #50
● All done with one technology.

Repository #1

Repository #2
Users
Microservices Rest Controller #1

Service #1
Advantages: Repository #1

● Small and focused on one domain or functionality,


● Independent, Addresses
● Easier to refactor, rework and use new technology.
Rest Controller #1

Service #1

Repository #1
Disadvantages:

Search
● Slower to begin with,
● Slower to develop entire application if doing it alone, Rest Controller #1

● More complex architecture, Service #1

Repository #1

You might also like