Wk 2 Monoliths Microservices Flashcards
Monolith architectural style:
Products are run by a single process and formed by a collection of modules.
Monolith:
Single process computer program with an internal structure formed by modules.
Procedure calls:
Communication between modules
Monolith advantages:
- Domain driven design : Modules can be made to correspond to business functions
- permissionless innovation : modules developed by teams working on agreed interfaces
- automatic deployment to version control of the program as a whole
Term monolith origins:
Monolith originated in the Linux community and used negatively as a synonym to legacy applications
Two pizza rule:
Every internal team needs to be small enough to be adequately fed by two pizzas.
Microservices Architectural style:
Products and applications are formed from a collection of microservices, each run by a separate process.
Message passing:
Communication between microservices
Microservice:
Application built with small independent components and around business capabilities. It is independently deployable.
Characteristics of microservices:
Componentization via services:
Organization around business and decentralised governance.
Microservice Advantages:
- coordination cost reduction
- easier deployment
- release when it is ready
- development using the best technology for the service
- robustness
- scaling
Coordination cost problem:
When one team is dependent on another to deliver. Appears in multi team projects and often there is a choice between slowing down or coordinate the teams ( tension between safety and speed )
Microservice minimises those costs.
Why does a microservice architecture increase robustness?
Because failure of one service does not impact another service.
Why are microservices good for scaling?
Resources for one service are not the same for another.
Microservice architecture design problems:
- Long feedback loops
- too many moving parts
- analysis paralysis
Why are there long feedback loops with microservices ?
It is difficult to do, identifying the impact of a decision until a problem arises, making it difficult to evaluate problems.
What is the issue with having many parts ?
Microservices are complex adaptive systems. When all parts come together an emergent system behaviour is produced. Small changes in a decision may impact in unexpected ways .
Analysis paralysis:
Decisions are both impactful and difficult to measure leading to endless speculation. End in a state of indecision trying to model endless permutations.
Conway’s law:
1968 “any organization that design it’s system will inevitably produce a design whose structure is a copy of the organisations communication structure”
What structures do many organisations follow:
A reverse of Conway’s law, organizations communication structure the same as their service structure.
Building a MVP:
- microservoces late
- microservices early
Microservices late:
Start with a monolith to entre the marketplace earlier and change to microservices later. Ready to learn from the customer.