06.Monolithic vs Microservice
Monolithic vs Microservice 
Advantage of monolithic application.
- Very simple to develop (Low complexity).
- It is easy to deploy because single file.
- It is easy
to scale, if we want to scale we can create multiple instances and behind a
load balancer those can be accessed(Y axis scaling).
Disadvantage of monolithic application.
- Large and complex application.-if the application is very
large, it is very difficult and complex to understand the project and it is
very difficult to understand how to correctly implement a change. So quality of
application is reduce.
- Slow development- Application and development team is grow, so difficult
to understand and modify the project. Large code may cause to slow the IDE so
it wastes the time.
- Blocks continuous development – when we change the small
modification to the system, we have to redeploy the entire project. But changed
is very small. When redeploy it there can be lost some dependencies and failed
to start project etc... Redeploy the entire project is risky.
- Unsalable -Each instance of the application will get access to all
the data. Which makes cashing less effective increase memory consumption.
Different component have different resource requirement. One might be memory insensitive
one may be CPU insensitive, but we cannot scale each component independently.
- Unreliable –All are tightly couple, so one component has a bug then
entire application will fail.
- Inflexible – One application might have millions lines of codes. But
if we want to adapt to a new technology then it is very hard to move it. Because
entire application should be adapted to new technology.
- Tightly couple - Everything resides in core exist within same instance of the server.
...............................................................................................................................................................
Advantage of
microservice application.
- Loosely coupled
- Agile and flexible – hotel booking down උනාට travel booking කරනන් පුළුවන්. One service is down, but not all the application will down.
- Independently development
- Independently deployment
- Mixed technology - Few services can be Java, few is c# few can be python.it can be use depend on the service
- Fault isolation
- Granular scaling- Traffic එක වැඩි සමහර MC පමණක් scale up කරන්න පුළුවන්.Hotel booking එකට එකට වැඩිනම් එම MC එක පමණක් scale up කරලා load balancer හරහා load එක අඩු instance එකකට යවන්න පුළුවන්.
Disadvantage
of microservice application.
- High complexity – breaking application in different and different business domain is not easy as well as with the huge application we need advanced architecture to decide how they can be broken down to different services and how they can manage and how they can access etc.
- Consistency – travel and (or) hotel book කරනවා.ඒවගේ data වෙනම එම DB වල store වෙන්වා.payment එක කරන්න ගියාම ඒ data ඕනේ.ඒවා MC, MC අතර හුවමාරු වෙන්න ඕනේ වෙනවා නිවැරදි විදිහකට.
- Automation- ගොඩක් services run
වන නිසා quickly
understand කරගන්න ඕනේ එක server එකක් down නම්,මේ server එක down කොහෙද
මේ sever එක
තියෙන්නේ, එම MC එකේ වෙනත් instance එකක් තියනවනම් quickly එකට යවන්නඕනේ වගේ ඒවා.මේකට මෙම ඔක්කොම automate කරලා තියන්න ඕනේ.
- Debugging - එක MC එකක් down උනාම
කොහෙද fault එක
ඇවිල්ල තියෙන්නේ, මොකද්ද reason එක
එම fault එකට
වගේ ඒවා manage කරගන්න අමාරුයි.
Comments
Post a Comment