上QQ阅读APP看书,第一时间看更新
Disadvantages of the microservice architecture pattern
Microservices provide several benefits, but there are also some challenges relating to microservice architecture when developing an enterprise application. These include the following:
- It is sometimes difficult to achieve strong consistency across services and transactions.
- Atomicity, Consistency, Isolation, Durability (ACID) transactions do not span multiple processes. ACID is a set of properties of database transactions intended to guarantee validity, even in the event of errors, power failures, and so on. This can be counteracted, however, using eventual consistency, which helps to manage transactions in a microservice application.
- A distributed system often:
- Is harder to debug or trace
- Has a greater need for end-to-end testing
- Requires you to expect, test for, and handle the failure of any process
- Has more components to maintain, which leads to issues such as redundancy or High Availability (HA)
- It typically requires a cultural change with regards to DevOps, such as how applications are developed and deployed, and the cooperation of Development and Operation teams
In light of its disadvantages, in the next section, we will discuss when to use microservice architecture for your project.