Microservices combat series

Microservices in Practice (1): Advantages and Disadvantages of Microservice Architecture: http://www.dockone.io/article/394

Microservices combat (2): Using API Gateway:


Microservice combat (3): In-depth inter-process communication of microservice architecture

http://dockone.io/article/549


notes:
Advantages and disadvantages:
Advantages: 1. The system is decentralized and developed separately, which solves the complexity. 2. It is developed separately and can use different technologies. 3. Separate deployment, shorten deployment time. 4. Independent expansion
Disadvantages: 1. The system is complex, the communication is complex, and the reliability is reduced. 2. The database design is not uniform, and there may be redundancy. 3. If it is a business based on multiple services, the deployment will be more difficult

API gateway:
If each interface is exposed to the user, the user needs to know the addresses of all services, and the api gateway can provide the outgoing interface uniformly
When services developed by different technologies, API gateway can unify external interfaces and convert protocols
When a business needs to provide multiple services, the API provides an interface to reduce the number of service communications
Can provide unified authorization, monitoring, caching, load balancing tasks

Microservice inter-process communication:
Several modes: synchronous, asynchronous (the client initiates the API and does not wait for the server to return), 1-to-1, 1-to-many (the client initiates an API request and waits for multiple service processing)
If the API needs to be upgraded, the new version and the old version of the API may run at the same time, and compatibility issues should be considered.
When a service is down, it needs to handle the request failure, such as rollback, disconnecting the route, immediately returning the error and no longer forwarding it to the server, the timeout mechanism

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325963364&siteId=291194637