πWhat is Microservice ?
Describe about Microservice
This is the most popular concept that all of the developer team followed in present. Monolith is the concept that we designed our system to be single application and has only one centralized. For this concept, It is hard to scale the application when it is big and hard for new joiner to understand the system. Microservice is the concept that distribute the system to multiple service or it call modular. Each services will be responsible for their own. It will have serparate Database and team owner. Advantage
Easy for scalability because the team owner will be responsible for that.
Easy to understand business concept because we seperate each business logic to each specific domain.
Can use different stack for each team
Drawbacks
Need to think about eventual consistency
Since we distribute the system then we need to handle for failure case and understand the design.
Reduce availability because when service A is running , service B can be down so we need to think about fallback case.
Since the system is loosely couple and distribute so It will has a lot of problems. There are a lot of patterns that you need to learn to handle these problems.
Pattern
Saga
Command Side Replica
API Composition
Messaging
API Gateway
Circuit breaker
Last updated