1/3
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is a microservices and why should we consider using it?
Splits business logic and the data access layer into several small parts called microservices
Can be used to have efficient application performance to avoid using a powerful server. Instead of one powerful server, you use several microservices for each of them.
iii. You don’t need to replicate the entire application, instead, you use a load balancer and use small parts of the application (non-uniform scaling). Deploy multiple instances of a particular service to get higher utilization with fewer server resources.
iv. Good portability
v. If one server has a failure other servers can still provide resources
vi. When updating the application we don’t have to shut down the entire application, instead use extra resources for the service you are updating.
vii. Scalability: When there are few requests, load is low so you can get rid of unnecessary resources and only use what is needed.
Changes in architecture while converting monolithic architecture to microservices.
1. Monolithic systems can take advantage of in-memory states (store sessions in memory) using hashmaps
2. In microservices, because of distribution, you cannot share memory data. All microservices should be designed as stateless functions.
3. In microservices, implementing transactions is very hard compared to monolithic systems.
Advantages and disadvantages of using microservices.
Advantages:
1. Strong scalability
2. Prog. Lang. doesn't matter.
3. Higher productivity for complex systems
4. Easy to learn
5. Agile friendly
ii. Negatives:
1. The granularity of a microservice architecture is hard to decide
2. Precise documentation
3. Need more experienced system operator
4. Needs to be integrated with continuous integration (CI) and continuous delivery (CD) or it will cost too much human resources.
Where is microservice architecture not applicable?
i. Should not be used for implementing transitions
ii. Should not be used to use in-memory states