Professional Documents
Culture Documents
Traditional Approach:
Micro-services:
Advantages:
MICROSERVICES Introduction:
Microservice Approach:
1. Each Micro-service must have its own data, could be any database: SQL, NOSQL, Mongo DB
etc.
Traditional Approach:
1. They can have different services running, but all services share the same data source/data
base. [Monolithic Architecture] unlike Microservice approach.
- Will discuss details about what you need to build Microservice based application.
Explanation of points:
1. You have many micros services, and then how you are going to consume/communicate
them from client applications.
Direct - consume directly from their web apps to your services
API Gateway – put something in between web app and services like security/API
2. Health Check
Checks health of API, Healthy means whether the data source or DB associated with
the Microservice is working or not (like: SQLserver is in working condition or not)
Health Check acts as a Watch Dog for all Microservice.
If Unhealthy don’t redirect them
3. Resilient Application
There can be chances of transaction failure due to network issue. Our database may
fail to respond to the request.
To avoid this, Use RETRY with exponential backoffs. This will ensure, will multiple
retries we may get the response from the data source.
We need to set the limit for the RETRY. Once the RETRY goes more than limit, RETRY
is stopped and exception message is sent that Microservice is not ready. This is
known as CIRCUIT BREAK.