Hyper-converged micro-service system for realizing multi-protocol communication, multi-type registration discovery and multi-type configuration control

By designing a hyper-converged microservice system, including the implementation of multiple modules, the existing microservice framework is solved, and the problem of difficulty in realizing multi-protocol communication, multi-type registration discovery and multi-type configuration control is realized, and stable interconnection and unified management between microservice clusters is realized.

CN119676102APending Publication Date: 2025-03-21GUOTAI JUNAN SECURITIES CO LTD

Patent Information

Application Number
CN202411519555.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The existing microservice framework is difficult to implement multi-protocol communication, multi-type registration and discovery, and multi-type configuration control, resulting in the inability to directly interconnect and interoperate between microservice clusters and complex management.

Method used

A hyper-converged microservice system is designed, including microservice hyper-converged communication module, registration and discovery module, control module, observable module, document module and general calling module, through which multi-protocol communication, multi-type registration and discovery, and multi-type configuration control are realized.

Benefits of technology

It realizes unified registration and release, unified service control, unified configuration management, and unified service observation of multi-protocol services, unified document generation, unified compilation and release, and supports universal calls and mock across protocols, solving the problem of interconnection between microservice clusters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119676102A_ABST
    Figure CN119676102A_ABST
Patent Text Reader

Abstract

The invention relates to a hyper-converged micro-service system for realizing multi-protocol communication, multi-type registration discovery and multi-type configuration control, and the system comprises a micro-service hyper-converged communication module which is used for uniformly creating, managing, detecting, using and destroying the connection of different communication protocols; the micro-service hyper-fusion registration discovery module is used for combining different registration centers into groups and combining services in a fusion mode; the micro-service hyper-convergence control module caches and configures in a unified cache mode in different configuration centers; and the micro-service hyper-fusion observable module is used for observing different types of indexes and links. By adopting the hyper-converged micro-service system for realizing multi-protocol communication, multi-type registration discovery and multi-type configuration control, unified registration release, unified service control, unified configuration management, unified service observation, unified document generation and unified compilation release of multi-protocol services can be realized; and a simple implementation environment is created for subsequent compatibility of the hyper-converged micro-service system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information system microservice system, and in particular to the field of information system microservice framework, and specifically refers to a hyper-convergent microservice system that realizes multi-protocol communication, multi-type registration discovery and multi-type configuration control. Background Art

[0002] In today's information age, all organizations are actively promoting information construction, and information system microservices have become an important technical guarantee for enterprises to respond to agile needs. However, the current information system microservices face many challenges, among which the most prominent are the diversity of microservice communication protocols, configuration centers, and registration centers, and the problems of consistent use and consistent aggregation.

[0003] Traditional microservice frameworks often focus on a single communication protocol, a single registration center, and a single configuration center. Multiple protocols cannot work together, multiple registration centers and configuration centers cannot integrate data, and it is difficult to ensure the consistency and reliability of integrated data, resulting in isolated microservice clusters based on different technology stacks. Clusters cannot be directly interconnected, and a large number of conversion and forwarding components are required, resulting in abnormal isolation of technical anomalies between microservices and abnormal degradation of request performance. The document management method, dependency package compilation and release method, service observability method, and service management and control of the microservice framework are very different every week, resulting in the inability to uniformly manage various microservices with different communication protocols. Summary of the invention

[0004] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a hyper-converged microservice system that realizes multi-protocol communication, multi-type registration discovery and multi-type configuration control with good consistency, high reliability and a wide range of applications.

[0005] In order to achieve the above objectives, the hyper-convergent microservice system for realizing multi-protocol communication, multi-type registration discovery and multi-type configuration control of the present invention is as follows:

[0006] The main features of the hyper-convergent microservice system that implements multi-protocol communication, multi-type registration discovery, and multi-type configuration control are that the system includes:

[0007] Microservice hyper-converged communication module, used to uniformly create, manage, detect, use, and destroy connections of different communication protocols;

[0008] A microservice hyper-convergence registration discovery module is connected to the microservice hyper-convergence communication module and is used to group registration centers of different types, different regions, and different computer rooms to combine services in a converged manner;

[0009] A microservice hyper-convergence control module, connected to the microservice hyper-convergence registration discovery module, is used to uniformly control service access in different configuration centers in a unified format, and cache configurations in a unified cache manner in different configuration centers;

[0010] A microservice hyper-convergence observable module is connected to the microservice hyper-convergence control module and is used to perform different types of indicator observations and link observations, and switch different observation methods through configuration and plug-ins;

[0011] A microservice hyper-convergence document module, connected to the microservice hyper-convergence observability module, is used to realize automatic generation of microservice interface documents of multiple communication protocols and automatic publishing of interface dependency packages;

[0012] The microservice hyper-convergence general call and Mock module are connected to the microservice hyper-convergence document module, and are used to call the server-side interface in a non-dependent manner, support mutual calls between services of different protocols, and realize non-dependent cross-protocol hyper-convergence calls.

[0013] Preferably, the connections managed by the microservice hyper-converged communication module include different protocol connections for plain text transmission and encrypted transmission, and the upper-layer application communication connections are invisible.

[0014] Preferably, the microservice hyper-converged registration discovery module supports multiple groups, and automatically switches the high-priority group to the low-priority group if it fails to work properly. The microservice hyper-converged registration discovery module uses multiple types of registration centers simultaneously as needed within a single process and groups them according to primary and secondary priorities.

[0015] Preferably, the rules controlled by the microservice hyper-convergence control module include RBAC access control at the service level, method level, and function number level, blacklist and whitelist at the service level, method level, and function number level, flow control, degradation control, fault tolerance control, fault injection control, and load balancing control.

[0016] Preferably, the microservice hyper-convergence control module also schedules traffic between service nodes in a unified manner based on traffic control rules, realizes grayscale release, blue-green release, and traffic coloring, and controls single-level traffic or multi-level traffic control.

[0017] Preferably, the microservice hyper-converged observability module supports observing the working status of clients and servers of different protocols in a unified manner, thereby realizing unified fusion observation of service status of different protocols.

[0018] Preferably, the microservice hyper-convergence general call and Mock module implement cross-protocol hyper-convergence calls through specific serialization methods and specific transmission structures, specify transmission services, methods, parameter serialization data and parameter types in the transmission structure, deserialize on the server side to find the corresponding service processing class and process it, and serialize the response again and return it to the requesting end.

[0019] The hyper-converged microservice system that realizes multi-protocol communication, multi-type registration discovery and multi-type configuration control of the present invention can realize unified registration and release, unified service control, unified configuration management, unified service observation, unified document generation, unified compilation and release of multi-protocol services, and can realize universal calls and universal mocks across protocols. Through the fusion and caching mechanism of multiple registration centers and the fusion and caching mechanism of multiple configuration centers, stable discovery, control and communication between financial-level multi-regional, multi-computer room and multi-heterogeneous service clusters can be realized, and multi-cluster gateway-free and adapter-free interconnection can be realized. Through automatic plug-in discovery and automatic responsibility chain assembly, a simple implementation environment is created for the subsequent compatibility of the hyper-converged microservice system with more communication protocols, registration centers, configuration centers and custom work chains. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 The logical architecture diagram of the hyper-converged microservice system for realizing multi-protocol communication, multi-type registration discovery and multi-type configuration control of the present invention.

[0021] Figure 2 A registration fusion diagram of a hyper-converged microservice system that implements multi-protocol communication, multi-type registration discovery, and multi-type configuration control of the present invention.

[0022] Figure 3 The present invention is a schematic diagram of the cross-protocol universal call implementation process of the hyper-converged microservice system that realizes multi-protocol communication, multi-type registration discovery and multi-type configuration control.

[0023] Figure 4 The present invention is a schematic diagram of the responsibility chain organization process of a hyper-converged microservice system that implements multi-protocol communication, multi-type registration discovery, and multi-type configuration control. DETAILED DESCRIPTION

[0024] In order to more clearly describe the technical content of the present invention, further description is given below in conjunction with specific embodiments.

[0025] The hyper-convergent microservice system of the present invention that implements multi-protocol communication, multi-type registration discovery, and multi-type configuration control includes:

[0026] Microservice hyper-converged communication module, used to uniformly create, manage, detect, use, and destroy connections of different communication protocols;

[0027] A microservice hyper-convergence registration discovery module is connected to the microservice hyper-convergence communication module and is used to group registration centers of different types, different regions, and different computer rooms to combine services in a converged manner;

[0028] A microservice hyper-convergence control module, connected to the microservice hyper-convergence registration discovery module, is used to uniformly control service access in different configuration centers in a unified format, and cache configurations in a unified cache manner in different configuration centers;

[0029] A microservice hyper-convergence observable module is connected to the microservice hyper-convergence control module and is used to perform different types of indicator observations and link observations, and switch different observation methods through configuration and plug-ins;

[0030] A microservice hyper-convergence document module, connected to the microservice hyper-convergence observability module, is used to realize automatic generation of microservice interface documents of multiple communication protocols and automatic publishing of interface dependency packages;

[0031] The microservice hyper-convergence general call and Mock module are connected to the microservice hyper-convergence document module, and are used to call the server-side interface in a non-dependent manner, support mutual calls between services of different protocols, and realize non-dependent cross-protocol hyper-convergence calls.

[0032] As a preferred embodiment of the present invention, the connections managed by the microservice hyper-converged communication module include different protocol connections for plain text transmission and encrypted transmission, and the upper-layer application communication connection is invisible.

[0033] As a preferred embodiment of the present invention, the microservice hyper-converged registration and discovery module supports multiple groups, and automatically switches the high-priority group to the low-priority group if it fails to work normally. The microservice hyper-converged registration and discovery module uses multiple types of registration centers simultaneously as needed within a single process and groups them according to primary and secondary priorities.

[0034] As a preferred embodiment of the present invention, the rules controlled by the microservice hyper-convergence control module include RBAC access control at the service level, method level, and function number level, blacklists and whitelists at the service level, method level, and function number level, flow control, degradation control, fault tolerance control, fault injection control, and load balancing control.

[0035] As a preferred embodiment of the present invention, the microservice hyper-convergence control module also schedules traffic between service nodes in a unified manner based on traffic control rules, realizes grayscale release, blue-green release, and traffic coloring, and controls single-layer traffic or multi-level traffic control.

[0036] As a preferred embodiment of the present invention, the microservice hyper-convergence observability module supports observing the working status of clients and servers of different protocols in a unified manner, thereby realizing unified fusion observation of service status of different protocols.

[0037] As a preferred embodiment of the present invention, the microservice hyper-convergence general call and Mock module realize cross-protocol hyper-convergence call through a specific serialization method and a specific transmission structure, specify the transmission service, method, parameter serialization data and parameter type in the transmission structure, deserialize on the server side to find the corresponding service processing class and process it, and serialize the response again and return it to the request end.

[0038] In the specific implementation of the present invention, it includes but is not limited to publishing or consuming common cross-language RPC protocol services such as Thrift, gRPC, HTTPHTTPS in the same process, and can run in multi-language environments such as C++ and Java, and supports non-Spring, Spring, and SpringBoot automatic assembly operation in the Java language environment. The patent of the present invention also realizes the registration and release of multiple groups of microservices based on Nacos, Zookeeper, ETCD, files and other registration centers in multiple regions, multiple computer rooms, multiple clusters, and multiple types. It overcomes the difficulties of collaborative work of multi-regional, multi-computer room, multi-cluster, and multi-type registration centers, and supports registration and discovery at different levels such as application level and service level. The patent of the present invention also realizes unified service control that can be used in multi-protocol and multi-language environments, including RBAC service authentication, service blacklist and whitelist, flow control, degradation control, fault tolerance control, load balancing control, fault injection, etc., and service control can realize multi-configuration center integration and switching control based on Nacos, Apollo, Zookeeper, files, etc. This patent also provides multi-protocol microservice observability based on Prometheus, Jaeger, Skywalking, etc., and integrates and switches between different observable middleware in a plug-in form. The patent of this invention also provides a method for quickly and automatically generating interface documents and publishing dependency packages based on Thrift, gRPC IDL files and HTTP interface codes. This patent is a hyper-converged microservice system that performs unified fusion registration, unified fusion control, unified document generation, unified compilation and release, and unified service observation, realizing the deep integration of multiple protocols, multiple registrations, and multiple controls within a single process, and realizing a unified management system for documents, releases, observations, etc.

[0039] A hyper-converged microservice system that implements multi-protocol communication, multi-type registration discovery, and multi-type configuration control includes:

[0040] Microservice hyper-convergence communication module; supports but is not limited to Thrift, gRPC, HTTP\HTTPS and other common cross-operating system and cross-language RPC communication protocols, and different protocols can be switched through configuration files, and different RPC languages ​​maintain the same usage. This module solves the problem of publishing or consuming multi-protocol services in a single process, and implements the implementation and consumption of different protocol services with a unified API style and unified annotation style.

[0041] Microservice hyper-convergence registration discovery module: supports fusion discovery of multiple registration center groups. Each registration center group can contain different types of registration centers such as Zookeeper, Nacos, files, etc. Each registration center group realizes the fusion of registration centers of different computer rooms, different regions, and different types. Multiple registration center groups realize high availability of registration center groups. The registration discovery mechanism can be quickly switched at the application level and service level. This module solves the problem of collaborative work of multi-regional, multi-cluster, and multi-type registration centers. Multiple registration aggregators can be defined in a single process. Each registration aggregator has multiple registration center groups, and each registration center group has multiple registration centers. The registration centers fuse the service registration information they obtain into the aggregator memory according to the fusion detection algorithm.

[0042] Microservice hyper-convergence control module: supports converged control of multiple configuration centers. The control rules include RBAC access control at the service level, method level, and function number level, blacklist and whitelist at the service level, method level, and function number level, flow control, degradation control, fault tolerance control, fault injection control, load balancing control, etc. Different configuration centers can work together according to priority. This module solves the problem that multiple configuration centers are difficult to work together, focusing on solving the problem of unified and interchangeable configuration of configuration centers.

[0043] Microservice hyper-convergence observability module: supports different types of indicator observation and link observation. Different observation methods can be quickly switched through configuration and plug-ins. The observed indicators include but are not limited to the working status of the server, the status of the server thread pool, the status of the server queue, the status of the client connection pool, the client node accessibility status, the working status of the registration center, the working status of the configuration center, the service, method, function number multi-level request QPS, RT, error rate and other core indicators. The link includes the record of the service, method, function number, input and output parameters, business unique identification code, etc. and the tracing of the call stack. This module mainly solves the problem of evaluating the service quality with the same observable caliber for different communication protocols.

[0044] Microservice hyper-convergence document module: supports automatic generation of microservice interface documents for multiple communication protocols and automatic publishing of interface dependency packages. It includes extracting service names, service comments, method names, method comments, method input and output parameters, field names, field types, field comments, etc., and realizes automatic association and jump between different levels. This module mainly solves the problem of providing call references and call dependencies for different communication protocols in the same document generation and service package compilation and publishing method.

[0045] Microservice hyper-convergence general call and Mock module: Supports clients to call server interfaces in a non-dependent manner, and supports mutual calls between services with different protocols, solving the difficulty of direct communication between multi-protocol microservices, realizing non-dependent cross-protocol hyper-convergence calls, and solving the problem of multiple organizational protocols and difficulties in direct connection. Supports unified Mock configuration based on conditional expressions, automatically matching whether to perform Mock and calculating Mock return values ​​based on service, method, function number, and input and output parameter values, and realizing cross-language service Mock.

[0046] The microservice hyper-convergence communication module includes:

[0047] A unified connection creation, testing, use, and destruction management system is used across communication protocols. Each communication protocol supports two communication modes: plain text and TLS communication. The connection test includes tests on the server's connectivity, version number, protocol, etc. Connections that pass the test can be recycled in a pooled reuse manner in subsequent microservice calls to avoid creating a large number of connections, ensuring the stability of service communications and reducing resource usage. A consistent method of use is used for different communication protocols. Applications using this system do not need to pay attention to the underlying connection management process, and remote methods are called in a similar way to calling local methods.

[0048] The microservice hyper-convergence registration discovery module includes:

[0049] Supports extensible registry plug-ins. Registries of different types, regions, and data centers can be combined into groups to perform combined discovery of services in a fusion manner. At the same time, each registry supports a consistent caching mechanism. When the registry cannot be connected normally, consistent registry failure downgrade is performed in the same way. Registry discovery supports multiple groups. If a high-priority group fails to work properly, it will automatically switch to a low-priority group. The fusion of multiple groups and multiple registry centers uses a timestamp algorithm and a heartbeat detection algorithm to ensure the ultimate consistency and accuracy of fusion discovery, and effectively prevent inconsistencies that may occur in multiple registry centers.

[0050] The microservice hyper-convergence control module includes:

[0051] It supports unified control of service access in different configuration centers in a unified format. The control content includes RBAC access, fault injection, blacklist and whitelist, flow control, degradation, fault tolerance, and fault injection of services. Different configuration centers cache configurations in a unified way. For example, when the configuration center is abnormal, the microservice work strategy is lost. At the same time, different configuration centers use priority algorithms, timestamp algorithms, summary algorithms, etc. to ensure the timeliness of the configuration and the consistency of multiple configuration centers.

[0052] The microservice hyper-convergence observability module includes:

[0053] Supports observing the working status of clients and servers of different protocols in a unified way, including logs, indicators and links. It realizes unified and integrated observation of service status of different protocols.

[0054] The microservice hyper-convergence control module includes:

[0055] Based on the traffic control rules, the traffic between service nodes is scheduled in a unified manner, which can easily implement grayscale release, blue-green release, and traffic coloring. It can control not only single-level traffic but also multi-level traffic control.

[0056] The system is plug-in-based, scalable, and multi-format configurable. The overall plug-in design allows plug-in and unplug components, such as using different load balancing algorithms and authentication algorithms. It supports configuration and automatic assembly based on XML, JSON, and Yaml, and supports external custom plug-ins, and plug-ins adopt automatic discovery and automatic assembly.

[0057] The technical solution of the present invention can provide multiple protocols simultaneously in a single process and provide a multi-registration center fusion solution, which mainly realizes multi-dimensional hyper-convergence of microservices in a single process.

[0058] See also Figures 1 to 3 As shown, the hyper-converged microservice system of the present invention that implements multi-protocol communication, multi-type registration discovery, and multi-type configuration control includes:

[0059] (1) Microservice hyper-converged communication module: used to uniformly create, manage, detect, use, and destroy connections of different communication protocols.

[0060] The microservice hyper-converged communication module manages connections including plain text transmission and encrypted transmission with different protocols, and is transparent to upper-layer applications, making upper-layer application communication connections invisible.

[0061] The microservice hyper-converged communication module manages three common cross-operating system and cross-language communication protocols: Thrift, gRPC, and HTTP, and supports the cross-operating system and cross-language use of this system.

[0062] The common configuration parameters of each communication protocol server include port, number of service threads, whether it is plain text transmission, encryption transmission algorithm, certificate, etc. The server configuration parameters of each communication protocol are consistent.

[0063] The common configuration parameters of each communication protocol client include connection establishment time, request timeout, number of connections, connection multiplexing related parameters, whether to transmit in plain text, encryption transmission algorithm, certificate, etc. The client configuration parameters of each communication protocol are consistent.

[0064] Through connection abstraction, the communication process of each protocol is transparent to other modules, and the processing process is similar. Through connection abstraction and extended automatic identification mechanism, the protocols supported by the framework can be quickly expanded, reserving a simple implementation environment for subsequent expansion of related RPC protocols.

[0065] The server of each protocol needs to provide service governance monitoring services and heartbeat detection services. Taking the heartbeat detection service as an example, the client can initiate a request to the service, and the server will return the service start time, protocol, application name, included services, application version, microservice framework version and other core data. The client will compare the server information obtained by the registration aggregator to determine the correctness of the registration data.

[0066] The communication connection is managed in a unified pool. When the connection is idle, the heartbeat detection service is used to detect the connection availability, reducing the failure of remote service calls caused by abnormal connections due to network disconnection and other problems. The connection pool will retain a fixed number of connections during idle periods, reducing the problem of slow remote service calls caused by temporary creation of connections during requests.

[0067] The main function of the microservice hyper-converged communication module is to implement the use of different communication protocols and connection lifecycle management within the same process with the same API, annotations, and the same connection pool management method.

[0068] (2) Microservice hyper-convergence registration discovery module: supports the fusion discovery of multiple registration center groups. Each registration center group realizes the fusion of registration centers in different computer rooms, different regions, and different types. Multiple registration center groups realize high availability of registration center groups. The registration discovery mechanism can quickly switch at the application level and service level.

[0069] The microservice hyper-converged registration discovery module includes consistent registration node cache management to avoid problems such as the registration center being unable to obtain nodes or the application being unable to start due to abnormalities. Each registration center will generate a corresponding cache folder in the file system based on information such as the address and tenant. After the service consumer is started, the service node list in the registration center will be cached to a file at a fixed frequency. The cache will retain a fixed number of cache files in a fixed time window. If the service consumer cannot connect to the registration center normally after startup, the fusion algorithm will be used to fuse the service provider list in the cache file of the registration center. The main fusion process is to aggregate based on the IP and port of the service provider and select the service node with the latest startup time from it.

[0070] The microservice hyper-convergence registration discovery module includes a fusion consistency algorithm and a node detection algorithm to ensure that the fused service provider node list is the latest and the node information is accurate. The algorithm mainly aggregates the IP and port information of the same service provider in different registration centers. If the IP and port do not exist in the memory, the node is directly used. If the same service has been started on the same IP and port in the content, the start time of the two is compared, and the new service provider information is updated and replaced with the start time. Under the premise of taking the latest registration information as the main factor, the client requests the server heartbeat detection interface according to the fusion result. If the registration information returned by the server heartbeat detection interface is consistent with the latest registration information, the node registration metadata is considered to be legal and the node is available. If the server is unreachable or the information is inconsistent, the node is considered to be unavailable or not used first. In the subsequent load balancing call process, the client gives priority to available nodes and does not give priority to unavailable nodes. When all nodes are unavailable nodes, the client will use unavailable nodes for load balancing calls.

[0071] The microservice hyper-convergence registration discovery module uses multiple types of registration centers simultaneously as needed in a single process and groups them according to primary and secondary priorities.

[0072] The microservice hyper-convergence registration discovery module and the microservice hyper-convergence communication module have node proxy access functions that can access the reverse proxy or the Service deployed on Kubernetes. The main method is to bring the reverse proxy IP and port when registering on the server. When the service client makes a call, it will connect to the proxy IP and port to reach the backend. There are some problems with the heartbeat detection of this type of proxy node. As long as the communication is successful, this type of node is considered available.

[0073] The microservice hyper-converged registration and discovery module has application-level registration and discovery and service-level registration and discovery functions. An application contains multiple services. When registering at the application level, there is only one record of registration information, and the service information is provided as registration metadata. When registering at the service level, there are multiple records of registration information, and the application information is provided as registration metadata.

[0074] The microservice hyper-convergence registration discovery module supports the registration discovery and integration of multiple registration centers such as Nacos, Zookeeper, ETCD, and files. It also supports customized rapid expansion in SPI mode.

[0075] The microservice hyper-convergence registration discovery module supports batch checks on node definitions, including checking whether the node is successfully registered, whether the node is reachable, etc., and monitoring event loss leading to registration failure, node acquisition failure, etc. If the node is reachable after one heartbeat detection, it is considered reachable, and if it is unreachable after three heartbeats, it is considered unavailable.

[0076] The microservice hyper-converged registration discovery module supports the use of service registration node information that is deeply integrated from registration centers of different regions and types in a unified manner within a single process, and reserves conditions for subsequent support for more types of registration centers through a custom extension plug-in mechanism.

[0077] (3) Microservice hyper-convergence control module: supports converged control of multiple configuration centers. The control rules include RBAC access control at the service level, method level, and function number level, blacklist and whitelist at the service level, method level, and function number level, flow control, degradation control, fault tolerance control, fault injection control, load balancing control, etc. Different configuration centers can work together according to priority.

[0078] The microservice hyper-convergence control module includes scalable service consumer authentication. Different authentication methods and authentication configurations can be used for different applications of multiple protocols. Service authentication includes Basic Auth, JWT and other mechanisms. The same service provider can use different authentication methods and different authentication parameters for different service consumers. Authentication information is transmitted using Header. Taking JWT authentication as an example, the request content summary, request time, request application name, etc. will be signed, and the server will verify to prevent the request from being tampered with and prevent request replay.

[0079] The microservice hyper-convergence control module includes service consumer RBAC access control. Consistent permission templates and consumer permission binding can be used for different applications of multiple protocols. A role can control access to multiple services, methods, etc. The control supports precise matching and module matching. A role can be associated with multiple service consumers. After the service consumer's request is authenticated, the service consumer's access rights are verified to determine whether the service consumer can access the service to obtain a response.

[0080] The microservice hyper-convergence control module adopts dynamic configuration of authentication mechanism and RBAC mechanism to achieve secure access control of multi-protocol services.

[0081] The microservice hyper-convergence control module includes consistent load balancing strategies for different applications of multiple protocols, including minimum number of connections, random, polling, node weight, and KV weight. Taking the minimum number of connections as an example, the service provider node with the least number of connections will be used for RPC calls. The random call uses a uniform sampling algorithm to randomly select service nodes from the service provider list for calling. The polling call uses a polling algorithm to call the service provider list in sequence. The node weight algorithm service providers with different IP and ports can have different weights, and random sampling is performed according to the node weight to confirm the service provider node to be called. The KV weight algorithm service provider can have different metadata information, for example, there can be nodes with version version = 1.0 and version version = 2.0. If the weight of version = 1.0 is 25% and the weight of version = 2.0 is 75%, no matter how many nodes there are in each version, the traffic called to version = 1.0 is randomly 25%, and the traffic called to version = 2.0 is randomly 75%. And based on these load balancing strategies, dynamic service release strategies such as blue-green release and grayscale release are implemented.

[0082] The microservice hyper-convergence control module has a traffic coloring load balancing process. Take application A calling application B as an example. Assume that the request header received by service A contains two types: userGroup=poc and userGroup=prod. Version B has two types: version=poc and version=prod. Set the traffic coloring strategy. When A receives userGroup=poc, the KV weight strategy of A requesting B is version=poc 100%, version=prod 0%; when A receives userGroup=prod, the KV weight strategy of A requesting B is version=poc 0%, version=prod 100%; different request balancing strategies can be set for different headers, and the header can be passed upstream and downstream through settings, thereby realizing full-link traffic control and traffic tracing based on the request header.

[0083] The microservice hyper-convergence control module has grayscale release and blue-green release processes, which mainly combine KV weights to realize blue-green release traffic switching, and combine traffic coloring load balancing process to realize grayscale release of new versions for some customers. The above-mentioned load balancing process, traffic coloring load balancing process, grayscale release, and blue-green release process are unified, integrated and managed by the configuration center, and are protocol-independent.

[0084] The microservice hyper-convergence control module includes solutions such as consistent flow control, degradation control, and fault-tolerant control for different applications of multiple protocols. Flow control includes funnel algorithm, token bucket algorithm, and concurrency algorithm. Degradation control includes RT algorithm and error rate algorithm. Different services, methods, and different application consumers or application consumer IPs under the same application can have different control policy sets, and the control policy set can be specified to take effect independently on the server or consumer side.

[0085] The fault tolerance control of the microservice hyper-convergence control module includes fast failure algorithm, retry algorithm, fault-tolerant call algorithm, etc. Fault tolerance can take effect on the service consumer side or the service provider side. In the retry algorithm, the retry process will give priority to abandoning the nodes that have failed, avoiding repeated errors caused by node pseudo-death and downtime.

[0086] The microservice hyper-convergence control module supports Nacos, Zookeeper, files and other configurations and performs deep integration. Each configuration center uses a consistent configuration data format and saves it as a cache file in a consistent manner to avoid the problem that the service provider and consumer cannot connect to the configuration center and cannot start when starting. The microservice hyper-convergence control module caches files with MD5 calculation digests to determine whether the file is updated.

[0087] The microservice hyper-convergence control module uses a hash algorithm to generate a unique identification code for the cache file path to prevent data pollution caused by switching between multiple environments. The microservice hyper-convergence control module uses priority to solve the problem of data conflicts in multiple configuration centers, with the relevant configuration of the configuration center with a high priority as the main focus.

[0088] The microservice hyper-convergence control module can use different configuration centers within the same process, and create conditions for supporting subsequent new configuration center types through custom plug-in automatic discovery and assembly mechanisms.

[0089] (4) Microservice hyper-convergence document generation and service compilation and release module: supports automatic generation of microservice interface documents for multiple communication protocols and automatic release of interface dependency packages. This includes extracting service names, service comments, method names, method comments, method input and output parameters, field names, field types, field comments, etc., and realizing automatic association and jump between different levels. Taking gRPCIDL as an example, when the user submits the Protobuf file and service definition file folder, the microservice management end automatically triggers compilation and releases protocol dependency packages for different languages ​​and operating systems. At the same time, it extracts the elements in the Protobuf and service definition files, generates HTML online documents for the relevant service interfaces in the release package, and supports association jumps between elements. At the same time, each release will automatically increment the release package and document version number, determine the difference between the two releases, and automatically identify the difference between the two service package versions.

[0090] The microservice hyper-convergence document generation and service compilation and publishing module includes the function of identifying or manually entering request parameters. Users can use comments, annotations or manual methods to generate request parameters.

[0091] Microservice hyper-convergence document generation and service compilation and release module: automatically generates service documents and multi-programming language and multi-operating system service interface packages in a unified cross-protocol manner based on IDL files and codes, including application information, service information, method information, input and output parameter information, field information, etc.

[0092] The microservice hyper-convergence document generation and service compilation and release module includes a multi-level mapping function. Taking method information as an example, the method information includes the input and output parameter types and names. By clicking the input and output parameter link, you can view the input and output parameter fields.

[0093] The microservice hyper-convergence document generation and service compilation and release module includes an automatic dependency upload function, which uploads service interface packages of multiple programming languages, multiple operating systems, and multiple versions to the dependency package management warehouse in a unified manner, making it convenient for various service providers and consumers to reference dependency packages.

[0094] (5) Microservice hyper-convergence universal call and Mock module: Supports clients to call server interfaces in a non-dependent manner, and supports mutual calls between services with different protocols, solving the difficulty of direct communication between multi-protocol microservices, realizing non-dependent cross-protocol hyper-convergence calls, and solving the problem of multiple organizational protocols and difficulties in direct connection. Supports unified Mock configuration based on conditional expressions, automatically matching whether to perform Mock and calculating Mock return values ​​based on service, method, function number, and input and output parameter values, and realizing cross-language service Mock.

[0095] The request parameters of the microservice hyper-convergence universal call and the Mock module universal call include the requested service name, the requested method name, the requested parameter serialization data, and the requested parameter serialization method. The client can use JSON, XML, and other methods to assemble the request parameters without relying on packages. The client can use the Thrift protocol client to call the gRPC or HTTP server, that is, it can implement cross-protocol, non-dependency calls. After receiving the request, the server uses the unpacking process of the transmission protocol to obtain the target service implementation class and method of the universal call, deserialize the request parameters as input parameters, and call the service and method at the same time, and transmit the response result to the request end through the transmission protocol. In the process of calling the template service implementation class and method, it is better than the decoding of the transmission layer that has been completed, and can be decoupled from the target service implementation class and method.

[0096] The Mock function in the Microservice Hyper-convergence General Call and Mock module includes client Mock and server Mock functions. The client Mock uses the client implementation of the server service interface, passing through most of the call links, but does not actually use the connection and make RPC calls. The server Mock uses files to configure test cases. The test cases use dynamic expressions of services, methods, and request parameters for dynamic matching. If no Mock match occurs based on the matching results, the server calls the actual implementation class. If a match occurs, the return result of the Mock case is returned based on the matching results.

[0097] Mock use cases use dynamic file discovery, and can dynamically modify and add Mock use cases.

[0098] Now, cross-protocol hyper-convergence calls specify the transmission service, method, parameter serialization data, and parameter type in the transmission structure, and deserialize on the server side and find the corresponding service processing class and process it, and then serialize the response again and return it to the requester. Common serialization methods include JSON, XML, etc.

[0099] The Mock in the microservice hyper-converged general call and Mock module adopts a cross-protocol configuration method and supports multi-protocol Mock matching. The matching method includes application name, service, method, input and output parameters, and supports expression matching. After the Mock use case is batched, it is automatically returned according to the Mock use case without the need to implement the interface.

[0100] (6) Microservice hyper-convergence observability module: supports different types of indicator observation and link observation. Different observation methods can be quickly switched through configuration and plug-ins. The observed indicators include but are not limited to the working status of the server, the status of the server thread pool, the status of the server queue, the status of the client connection pool, the client node accessibility status, the working status of the registration center, the working status of the configuration center, the service, method, function number multi-level request QPS, RT, error rate and other core indicators. The link includes the record of the service, method, function number, input and output parameters, business unique identification code, etc. and the tracing of the call stack.

[0101] The microservice hyper-convergence observability module also has a service quality interface, which includes various detailed data such as the registration center list and status, the registration center list and status, the fusion registration service list and status, the fusion configuration information, the connection pool status, etc., providing more detailed diagnostic data based on the observable indicators.

[0102] The indicator monitoring of the microservice hyper-convergence observability module supports monitoring through Prometheus, Log, JMX and other methods.

[0103] The microservice hyper-convergence observability module includes consistent observability strategies for different applications of multiple protocols, including server-side thread occupancy, queue accumulation, client-side connection pool occupancy, registration center connectivity status, configuration center connectivity status, applications, services, methods, function numbers, error rates, throughput, latency, etc. It also supports processing links of different protocols in a unified manner, including links on the client and server sides.

[0104] The microservice hyper-converged observability module supports plug-in parsing of input and output parameters, which is used to extract key data in requests and responses such as business IDs, business errors, etc., and can report them to related link middleware.

[0105] The microservice hyper-convergence observability module supports observing indicators through JMX, Prometheus, Log, etc., and supports observing links through Skywalking, Jaeger, etc.

[0106] (7) Microservice hyper-convergence alarm module: supports self-monitoring of the service itself, such as failure of the server to start normally, server thread usage exceeding the threshold, server queue accumulation exceeding the threshold, client connection pool connection number exceeding the threshold, registration center connection status abnormal, configuration center connection status abnormal, client to server node unreachable, server response slow, error rate exceeding the threshold, client request response slow, error rate exceeding the threshold, etc. Alarm information can be summarized at fixed time intervals to avoid frequent sending, and various abnormal data can be counted in sliding time windows.

[0107] When an unexpected situation occurs where the server responds slowly or the error rate exceeds the threshold, stack sampling analysis can be automatically enabled to retain related abnormal threads and assist in fault diagnosis.

[0108] (8) Microservice hyper-converged responsibility chain management module: supports the management of various responsibility chains, including client-call front-end responsibility chain, client-side wrap-around responsibility chain, client-side post-end responsibility chain, server-side front-end responsibility chain, server-side wrap-around responsibility chain, and server-side post-end responsibility chain. It can implement custom extensions of responsibility chain plug-ins based on dynamic extension mechanisms such as SPI, and can use removal configuration to remove a certain responsibility chain component.

[0109] The microservice hyper-converged responsibility chain management module has automatic sorting and automatic assembly functions. The automatic sorting is based on dependencies. If the dependency is not available, the responsibility chain plug-in will not be loaded. After the dependency is available, the responsibility chain is sorted by priority and organized into a chain structure.

[0110] (9) Microservice hyper-converged data center and region selection module: Supports the IP data center and region acquisition mechanism based on CMDB or files. When the client calls the server, it can select the data center and region responsible for the balancing strategy, giving priority to calling the local data center, followed by the local region, and finally calling the remote cluster.

[0111] (10) Microservice hyper-convergence access gateway: This microservice hyper-convergence system has a fully dynamic access gateway with no dependency on multiple protocols. The Java client implements this feature in a variety of ways. Method 1) Based on general calls, the client automatically detects the multi-node access of the gateway node and manages the connection pool as technical support, and uses the gateway's Listener dynamic configuration, Cluster dynamic configuration, and EndPoint dynamic configuration to realize the dynamic identification of background services based on requests and the fusion discovery of background nodes, so as to realize the full-link dynamic and non-dependency free call of the ultra-light client. Method 2) The Java client automatically identifies and loads the required dependency packages based on the dynamic URLClassLoader. It communicates with the gateway in a non-general call mode. The gateway realizes the dynamic identification of background services and the fusion discovery of background nodes based on non-general call requests by identifying the application, service, and method information set in the request header, and then realizes the full-link dynamic and dependent free call of the ultra-light client.

[0112] This microservice hyper-convergence system has the ability to publish and consume multiple protocols in a single process at the same time, supports different or consistent registration centers for different protocols, supports different or consistent service or application-level registration mechanisms for different protocols, and supports different or consistent configuration centers for different protocols. Each service provider and consumer can configure different security policies, flow control policies, load balancing policies, etc. Each service provider and consumer implements configuration isolation of multi-type configuration center integration. Compared with the currently widely circulated Spring Cloud framework, it is impossible to achieve fully seamless integration and fully seamless isolation of multiple protocols, multiple registrations, and multiple configurations in a single process.

[0113] This microservice hyper-convergence system uses XML, JSON, YAML, etc. to configure the microservice environment and can also rely on fully automatic assembly to achieve self-assembly without configuration files.

[0114] This microservice hyper-convergence system adopts a composite security strategy, which mainly includes configuration security, access authentication security, access permission security, transmission security and other aspects.

[0115] This microservice hyper-convergence system uses dynamic placeholder parsing and secure encryption and decryption mechanisms to implement ciphertext configuration of sensitive information, ensuring that key data of the microservice system is not leaked.

[0116] This microservice hyper-convergence system uses a service authentication mechanism to achieve microservice access security. And through the request summary JWT signature and timestamp mechanism, it realizes the request anti-tampering and anti-replay functions.

[0117] This microservice hyper-convergence system uses a service permission control mechanism to implement the ability of the same publishing service to control different access permissions for different access terminals.

[0118] This microservice hyper-convergence system achieves channel transmission security by setting up an encrypted transmission method for the communication protocol.

[0119] The hyper-converged microservice system has plug-in expansion capabilities, which can quickly and uniformly expand various types of plug-ins, such as registration and discovery, service control, etc.

[0120] The hyper-converged microservice system has multiple configuration capabilities, including XML, JSON, YAML, and configuration-free automatic assembly methods, which facilitates use based on various types of development frameworks.

[0121] What is significantly different from Spring Cloud is that the hyper-converged microservice system that implements multi-protocol communication, multi-type registration discovery, and multi-type configuration control emphasizes the principle of minimum dependency, rather than pursuing big and comprehensive like Spring Cloud and being deeply bound to Spring. It can be started without Spring.

[0122] The specific implementation scheme of this embodiment can refer to the relevant description in the above embodiment, which will not be repeated here.

[0123] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0124] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.

[0125] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0126] The hyper-converged microservice system that realizes multi-protocol communication, multi-type registration discovery and multi-type configuration control of the present invention can realize unified registration and release, unified service control, unified configuration management, unified service observation, unified document generation, unified compilation and release of multi-protocol services, and can realize universal calls and universal mocks across protocols. Through the fusion and caching mechanism of multiple registration centers and the fusion and caching mechanism of multiple configuration centers, stable discovery, control and communication between financial-level multi-regional, multi-computer room and multi-heterogeneous service clusters can be realized, and multi-cluster gateway-free and adapter-free interconnection can be realized. Through automatic plug-in discovery and automatic responsibility chain assembly, a simple implementation environment is created for the subsequent compatibility of the hyper-converged microservice system with more communication protocols, registration centers, configuration centers and custom work chains.

[0127] In this specification, the present invention has been described with reference to specific embodiments thereof. However, it is apparent that various modifications and variations may be made without departing from the spirit and scope of the present invention. Therefore, the specification and drawings should be regarded as illustrative rather than restrictive.

Claims

1. A hyper-converged microservice system that implements multi-protocol communication, multi-type registration discovery, and multi-type configuration control, characterized in that: The system comprises: Microservice hyper-converged communication module, used to uniformly create, manage, detect, use, and destroy connections of different communication protocols; A microservice hyper-convergence registration discovery module is connected to the microservice hyper-convergence communication module and is used to group registration centers of different types, different regions, and different computer rooms to combine services in a converged manner; A microservice hyper-convergence control module, connected to the microservice hyper-convergence registration discovery module, is used to uniformly control service access in different configuration centers in a unified format, and cache configurations in a unified cache manner in different configuration centers; A microservice hyper-convergence observable module is connected to the microservice hyper-convergence control module and is used to perform different types of indicator observations and link observations, and switch different observation methods through configuration and plug-ins; A microservice hyper-convergence document module, connected to the microservice hyper-convergence observability module, is used to realize automatic generation of microservice interface documents of multiple communication protocols and automatic publishing of interface dependency packages; The microservice hyper-convergence general call and Mock module are connected to the microservice hyper-convergence document module, and are used to call the server-side interface in a non-dependent manner, support mutual calls between services of different protocols, and realize non-dependent cross-protocol hyper-convergence calls.

2. The hyper-converged microservice system for realizing multi-protocol communication, multi-type registration discovery and multi-type configuration control according to claim 1, characterized in that: The connections managed by the microservice hyper-converged communication module include different protocol connections for plain text transmission and encrypted transmission, and the upper-layer application communication connections are invisible.

3. The hyper-converged microservice system for realizing multi-protocol communication, multi-type registration discovery and multi-type configuration control according to claim 1, characterized in that: The microservice hyper-convergence registration discovery module supports multiple groups, and automatically switches the high-priority group to the low-priority group if it fails to work normally. The microservice hyper-convergence registration discovery module uses multiple types of registration centers simultaneously on demand in a single process and groups them according to primary and secondary priorities.

4. The hyper-converged microservice system for realizing multi-protocol communication, multi-type registration discovery and multi-type configuration control according to claim 1, characterized in that: The rules controlled by the microservice hyper-convergence control module include RBAC access control at the service level, method level, and function number level, blacklist and whitelist at the service level, method level, and function number level, flow control, degradation control, fault tolerance control, fault injection control, and load balancing control.

5. The hyper-converged microservice system for realizing multi-protocol communication, multi-type registration discovery and multi-type configuration control according to claim 1, characterized in that: The microservice hyper-convergence control module also schedules traffic between service nodes in a unified manner based on traffic control rules, realizes grayscale release, blue-green release, and traffic coloring, and controls single-layer traffic or multi-layer traffic control.

6. The hyper-converged microservice system for realizing multi-protocol communication, multi-type registration discovery and multi-type configuration control according to claim 1, characterized in that: The microservice hyper-convergence observability module supports observing the working status of clients and servers of different protocols in a unified manner, thereby realizing unified fusion observation of the service status of different protocols.

7. The hyper-converged microservice system for realizing multi-protocol communication, multi-type registration discovery and multi-type configuration control according to claim 1, characterized in that: The microservice hyper-convergence general call and Mock module realize cross-protocol hyper-convergence call through specific serialization method and specific transmission structure, specify transmission service, method, parameter serialization data and parameter type in the transmission structure, deserialize on the server side to find the corresponding service processing class and process it, and serialize the response again and return it to the request end.

Citation Information

Patent Citations

  • Implementation method of microservice framework integrating with free combination of multiple communication protocols

    CN109587246A

  • Fusion method and device for multiple micro-service architectures

    CN110990047A

  • Micro-service unified management method and device for multiple registration centers, equipment and medium

    CN112286503A

  • Multi-type micro-service registration center management system and method

    CN112311869A

  • Fusion service system based on service orchestration

    CN117201262A

Cited By

  • Wood floor production process data WebAPI packaging and publishing method based on micro-service architecture

    CN121349474A

  • Wood floor production process data web API encapsulation and publishing method based on micro-service architecture

    CN121349474B