06.Monolithic vs Microservice

 Monolithic  vs Microservice 


Advantage of monolithic application.

  1. Very simple to develop (Low complexity).
  2. It is easy to deploy because single file.
  3. 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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. Unreliable –All are tightly couple, so one component has a bug then entire application will fail.
  6. 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.
  7. Tightly couple - Everything resides in core exist within same instance of the server.

 

...............................................................................................................................................................

Advantage of microservice application.

  1. Loosely coupled
  2. Agile and flexible – hotel booking down උනාට travel booking කරනන් පුළුවන්. One service is down, but not all the application will down.
  3. Independently development
  4. Independently deployment
  5. Mixed technology - Few services can be Java, few is c# few can be python.it can be use depend on the service
  6. Fault isolation
  7. Granular scaling- Traffic එක වැඩි සමහර MC පමණක් scale up කරන්න පුළුවන්.Hotel booking එකට එකට වැඩිනම් එම MC එක පමණක් scale up කරලා load balancer හරහා load එක අඩු instance එකකට යවන්න පුළුවන්.


Disadvantage of microservice application.

  1. 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.
  2. Consistency – travel and (or) hotel book කරනවා.ඒවගේ data වෙනම එම DB වල store වෙන්වා.payment එක කරන්න ගියාම data ඕනේ.ඒවා MC, MC අතර හුවමාරු වෙන්න ඕනේ වෙනවා නිවැරදි විදිහකට.
  3. Automation- ගොඩක් services run වන නිසා quickly understand කරගන්න ඕනේ එක server එකක් down නම්,මේ server එක down කොහෙද මේ sever එක තියෙන්නේඑම MC එකේ වෙනත් instance එකක් තියනවනම් quickly එකට යවන්නඕනේ වගේ ඒවා.මේකට මෙම ඔක්කොම automate කරලා තියන්න ඕනේ.
  4. Debugging - එක MC එකක් down උනාම කොහෙද fault එක ඇවිල්ල තියෙන්නේ, මොකද්ද reason එක එම fault එකට වගේ ඒවා manage කරගන්න අමාරුයි.


Comments

Popular posts from this blog

09.Data Binding.

Database - Topics

02. Spring – Creating spring project clone it with GIT step by step.