In the current project, microservices are in full swing and have become the mainstream of development and architecture, and there are various service architectures. Today according to the personal understanding of the micro service specially organize their understanding of micro service architecture illustrations, considered in map this matter a lot, purpose is to don’t want to late each project separate draw a structure based on the legend, hope to have a generic architecture, every other system directly to obey, the profile design section can cover a broader business system. As follows:

The original connection address: www.processon.com/view/5d70cc… , can be directly online cloning, according to their own needs to change.

Architecture description:

1. Service Management (4 centers)

In the legend, there are four centers: registration, configuration, authentication and monitoring, which mainly support the normal operation of the entire microservice cluster and are also of vital importance.

Internal services are registered in the registry and interfaces of other services are exposed. Service parameters are updated and maintained through the configuration center, and all external users are authenticated and authorized through the gateway. All services are summarized in the monitoring center. You can view the health status of each service.

2. Unified gateway

As shown above, the system is not limited to the use of what distributed framework and technology, external unified through the gateway to provide API interface or other forms such as WebSockt, MQTT and other forms; The gateway center is mainly responsible for receiving external requests, authenticating the requests through the data provided by the authorization center, and controlling the interface traffic limiting policies. Finally, the requests that pass all the rules are routed to the actual microservice cluster at the back end.

3. Business microservices

Each business microservice can be divided according to the actual business domain (refer to the domain modeling idea DDD here), each microservice can have its own independent DB, external or dependent on other service interfaces are unified through the REST API form of external exposure or dependency.

4. Internal interaction

The internal interaction of microservices is carried out in two ways: One is through direct interface connection and synchronous invocation. This method, to a certain extent, facilitates the link monitoring of later services and meets the needs of most services. The other one uses message middleware to realize asynchronous invocation between internal services. If the link monitoring is required as the first one, request IDS need to be added to the message protocol body and tracked and monitored. Asynchronous invocation of messages needs to be selected according to the characteristics of the business.

5. External heterogeneous system integration

In the figure, the Open API is mainly an interface Open to the outside world. Therefore, the integration between heterogeneous systems requires the authorization of the internal authentication center. Otherwise, the interface cannot be invoked. External interfaces can be in various forms, such as HTTP, MQ, and WebSocket, and can be selectively invoked based on actual services

6. DevOps

In terms of development, operation, maintenance and deployment, development, implementation and deployment of all services are based on DevOps, including service virtualization, containerization, code static scanning, automatic testing, automatic build and automatic release, etc., all of which are completed by integrated DevOps tools and environment.

7. Monitoring and maintenance

The system is monitored by a unified monitoring platform. A professional log analysis platform provides log monitoring and analysis. A professional security policy implements security protection. PAAS layer services are recommended for implementation here, such as Alibaba Cloud, Microsoft Cloud and AWS provide corresponding services. Here, the monitoring is based on hardware, VIRTUAL machine, network, and security attacks. The monitoring center of the service varies.

conclusion

To sum up, according to the thinking of this architecture, basically can accommodate many concept, the idea in the description of the architecture is not limited to the specific technical implementation at the same time, the architecture design can actually put forward reference for technology selection, because how many are revealed in the framework of demand for technology, rather than for a strong dependence on technology components.