Microservice application access method, device, computer equipment, medium and product

By introducing microservice proxy nodes in off-site multi-living systems to resolve and route microservice application access requests, the low security problem caused by microservice nodes exposed to access requests is solved, and higher access security is achieved.

CN119254840BActive Publication Date: 2025-05-06CHINA TELECOM CLOUD TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411766543.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-05-06
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

When accessing microservice applications, the microservice nodes of the off-site multi-active system are directly exposed to the access request of the microservice application, resulting in high risk of network attacks and prone to microservice terminals or data leakage, which in turn makes access security low.

Method used

By introducing multiple microservice proxy nodes in a remote multi-living system, we identify and analyze microservice application access requests, generate microservice routing information, locate the target microservice access node, and route the access requests to the target microservice access node through the target microservice proxy node, transparent access and forwarding of microservice applications is achieved.

Benefits of technology

By introducing target microservice access nodes, the microservice nodes are avoided directly exposed to access requests, reducing the risk of network attacks, and improving the security of microservice application access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119254840B_ABST
    Figure CN119254840B_ABST
Patent Text Reader

Abstract

The present application relates to a microservice application access method, device, computer equipment, medium and product. The method includes: in response to a microservice application access request, identifying the microservice application targeted by the microservice application access request; parsing the microservice application access request through a target microservice proxy node to obtain microservice routing information, and locating the target microservice access node corresponding to the microservice application access request according to the microservice routing information; in the case where the target microservice access node is successfully located, routing the microservice application access request to the target microservice access node through the target microservice proxy node, so that the target microservice access node can send the microservice application access result to the target microservice proxy node based on the microservice application access request; after the target microservice proxy node receives the microservice application access result, the microservice application is accessed according to the microservice application access result. The use of this method improves the access security of microservice application access.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a microservice application access method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the continuous development of science and technology, in order to meet the high requirements of stability and reliability of computer systems, multi-site active-active technology has been widely used in the industry, especially for microservice architecture. It has high adaptability with multi-site active-active system. Accessing microservice applications under microservice architecture through multi-site active-active system can bring advantages in many aspects such as disaster recovery capability, load balancing and business expansion.

[0003] At present, in the process of accessing microservice applications, the corresponding microservices are usually accessed through direct interaction between the microservice nodes of the remote multi-active system and the microservice application access request. However, since the microservice nodes are directly exposed to the microservice application access request, the remote multi-active system is at risk of network attacks, which makes it easy for microservice terminals or data leaks to occur. Therefore, the current access security of microservice applications is low. Summary of the invention

[0004] Based on this, it is necessary to provide a microservice application access method, apparatus, computer device, computer-readable storage medium and computer program product to improve the access security of microservice application access in response to the above technical problems.

[0005] In a first aspect, the present application provides a microservice application access method, which is applied to a remote multi-active system, wherein the remote multi-active system is deployed with multiple microservice proxy nodes, including:

[0006] In response to a microservice application access request, identifying a microservice application targeted by the microservice application access request, wherein one of the microservice applications corresponds to one target microservice proxy node;

[0007] Parsing the microservice application access request through the target microservice proxy node to obtain microservice routing information, and locating the target microservice access node corresponding to the microservice application access request according to the microservice routing information;

[0008] When the target microservice access node is successfully located, the microservice application access request is routed to the target microservice access node through the target microservice proxy node, so that the target microservice access node generates a microservice application access result corresponding to the microservice application access request, and sends the microservice application access result to the target microservice proxy node;

[0009] After the target microservice proxy node receives the microservice application access result, the target microservice proxy node accesses the microservice application according to the microservice application access result.

[0010] In one embodiment, the microservice routing information includes first microservice routing information and second microservice routing information; and locating a target microservice access node corresponding to the microservice application access request according to the microservice routing information includes:

[0011] According to the first microservice routing information, query the target access site of the microservice application access request;

[0012] The target microservice access node is located at the target access site according to the second microservice routing information.

[0013] In one of the embodiments, locating the target microservice access node at the target access site according to the second microservice routing information includes:

[0014] Extracting the total application traffic of the microservice application from the microservice application access request;

[0015] According to the second microservice routing information, query multiple available microservice access nodes under the target access site;

[0016] According to the total application traffic, multiple microservice collaborative access nodes are selected from the multiple available microservice access nodes, wherein the total application traffic is the same as the sum of the application traffic shares corresponding to each of the multiple microservice collaborative access nodes, and the application traffic shares between different microservice collaborative access nodes satisfy a preset traffic allocation relationship;

[0017] The multiple microservice collaborative access nodes are collectively used as the target microservice access node.

[0018] In one of the embodiments, when the target microservice access node is successfully located, before routing the microservice application access request to the target microservice access node through the target microservice proxy node, the method further includes:

[0019] When it is detected that the target access site meets the preset routing condition, it is determined that the target microservice access node is successfully located;

[0020] When it is detected that the target access site does not satisfy the preset routing condition, it is determined that the positioning of the target microservice access node has failed, and a request exception result of the microservice application access request is output.

[0021] In one embodiment, the method further comprises:

[0022] After determining that the target microservice access node fails to be located, selecting a backup access site for the microservice application access request from the multiple multi-active access sites according to site information of the multiple multi-active access sites;

[0023] When it is detected that the standby access site meets the preset routing condition, the microservice routing information is updated according to the standby access site to obtain updated microservice routing information;

[0024] According to the updated microservice routing information, a target microservice access node corresponding to the microservice application access request is located.

[0025] In one embodiment, the site information includes site operation status information and site location information; the selecting a backup access site for the microservice application access request from the multiple multi-active access sites according to the site information of the multiple multi-active access sites includes:

[0026] Generate a first switching evaluation index of the multiple active-active access sites according to the site location information, wherein the first switching evaluation index is used to characterize the distance between the multiple active-active access site and the target access site;

[0027] Generate a second switching evaluation index of the multiple active-active access sites according to the site operation status information, wherein the second switching evaluation index is used to characterize the operation status of the multiple active-active access sites;

[0028] For any of the multi-active access sites, the first switching evaluation indicator and the second switching evaluation indicator are merged according to the indicator weights corresponding to the first switching evaluation indicator and the second switching evaluation indicator, so as to obtain a total switching evaluation indicator of the multi-active access site, wherein the total switching evaluation indicator is used to characterize the degree of switching matching between the multi-active access site and the target access site;

[0029] According to the index ranking result of all switching evaluation total indicators, a backup access site for the microservice application access request is selected from the multiple multi-active access sites.

[0030] In a second aspect, the present application also provides a microservice application access method device, which is applied to a remote multi-active system, wherein the remote multi-active system is deployed with multiple microservice proxy nodes, including:

[0031] an identification module, configured to identify, in response to a microservice application access request, a microservice application to which the microservice application access request is directed, wherein one of the microservice applications corresponds to one target microservice proxy node;

[0032] A positioning module, used to parse the microservice application access request through the target microservice proxy node, obtain microservice routing information, and locate the target microservice access node corresponding to the microservice application access request according to the microservice routing information;

[0033] A routing module, for routing the microservice application access request to the target microservice access node through the target microservice proxy node when the target microservice access node is successfully located, so that the target microservice access node generates a microservice application access result corresponding to the microservice application access request, and sends the microservice application access result to the target microservice proxy node;

[0034] The access module is used to access the microservice application according to the microservice application access result after the target microservice proxy node receives the microservice application access result.

[0035] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0036] In response to a microservice application access request, identify the microservice application targeted by the microservice application access request, wherein one of the microservice applications corresponds to a target microservice proxy node; parse the microservice application access request through the target microservice proxy node to obtain microservice routing information, and locate the target microservice access node corresponding to the microservice application access request according to the microservice routing information; if the target microservice access node is successfully located, route the microservice application access request to the target microservice access node through the target microservice proxy node, so that the target microservice access node generates a microservice application access result corresponding to the microservice application access request, and sends the microservice application access result to the target microservice proxy node; after the target microservice proxy node receives the microservice application access result, access the microservice application according to the microservice application access result.

[0037] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0038] In response to a microservice application access request, identify the microservice application targeted by the microservice application access request, wherein one of the microservice applications corresponds to a target microservice proxy node; parse the microservice application access request through the target microservice proxy node to obtain microservice routing information, and locate the target microservice access node corresponding to the microservice application access request according to the microservice routing information; if the target microservice access node is successfully located, route the microservice application access request to the target microservice access node through the target microservice proxy node, so that the target microservice access node generates a microservice application access result corresponding to the microservice application access request, and sends the microservice application access result to the target microservice proxy node; after the target microservice proxy node receives the microservice application access result, access the microservice application according to the microservice application access result.

[0039] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0040] In response to a microservice application access request, identify the microservice application targeted by the microservice application access request, wherein one of the microservice applications corresponds to a target microservice proxy node; parse the microservice application access request through the target microservice proxy node to obtain microservice routing information, and locate the target microservice access node corresponding to the microservice application access request according to the microservice routing information; if the target microservice access node is successfully located, route the microservice application access request to the target microservice access node through the target microservice proxy node, so that the target microservice access node generates a microservice application access result corresponding to the microservice application access request, and sends the microservice application access result to the target microservice proxy node; after the target microservice proxy node receives the microservice application access result, access the microservice application according to the microservice application access result.

[0041] The above-mentioned microservice application access method, device, computer equipment, computer-readable storage medium and computer program product are applied to a multi-active remote system. The multi-active remote system is deployed with multiple microservice proxy nodes. First, in response to a microservice application access request, the microservice application targeted by the microservice application access request is identified. Since there is a one-to-one correspondence between the microservice application and the microservice proxy node, the target microservice proxy node can be determined through the microservice application. Then, the microservice application access request is parsed through the target microservice proxy node to obtain microservice routing information, and the target microservice access node corresponding to the microservice application access request is located according to the microservice routing information. That is, by introducing a microservice proxy node, the microservice application access request is parsed and the corresponding target microservice access node is located. Then, when the target microservice access node is successfully located, the target microservice proxy node routes the microservice application access request to the target microservice access node so that the target microservice access node can generate a microservice application access result. And send the microservice application access result to the target microservice proxy node. Finally, after the target microservice proxy node receives the microservice application access result, it accesses the microservice application according to the microservice application access result. Since the microservice application access request is forwarded to the target microservice access node by the target microservice proxy node, and the microservice application access result generated by the target microservice access node is also fed back through the target microservice proxy node, the target microservice access node is not exposed to the microservice application access request. Therefore, by introducing the target microservice access node, the purpose of transparent access and forwarding to the microservice application is achieved, instead of requiring direct interaction between the microservice node and the microservice application access request to achieve access to the microservice application. Therefore, it overcomes the technical defect that the multi-active system in different locations is at risk of network attacks due to the direct exposure of the microservice node to the microservice application access request, which makes it easy to have microservice terminals or data leakage. Therefore, the access security of microservice application access is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0043] Figure 1 A schematic diagram of a process of accessing a microservice application in one embodiment;

[0044] Figure 2 It is a schematic diagram of the architecture of a mall system of a microservice application access method in another embodiment;

[0045] Figure 3 A flowchart of a microservice application access method in another embodiment;

[0046] Figure 4 An access flow chart of a microservice application access method in an embodiment of the microservice application access method;

[0047] Figure 5 A structural block diagram of the access device for microservice applications;

[0048] Figure 6 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0050] First of all, it should be understood that multi-active disaster recovery is an architectural design method for improving system reliability and high availability. It deploys the same system instance in multiple geographical locations or data centers, and replicates and synchronizes data and services to ensure that the system can continue to provide services in the event of failures and disasters. That is, the business system is transformed into a multi-active system in different locations. Users can quickly switch traffic between different regions to achieve load balancing and fault tolerance, thereby improving the availability and stability of microservice applications. However, there are still some challenges in the implementation of traditional multi-active technology in different locations. For example, in the process of accessing microservice applications, the direct interaction between the microservice nodes of the multi-active system in different locations and the microservice application access requests will cause the microservice nodes to be directly exposed to the microservice application access requests, which makes it easy for microservice terminals or data leakage to occur. Therefore, there is an urgent need for a microservice application access method that can improve the access security of microservice application access.

[0051] In one embodiment, Figure 1As shown, a microservice application access method is provided. This embodiment takes the method applied to a terminal as an example. The terminal is provided with a remote multi-active system, and the remote multi-active system is deployed with multiple microservice proxy nodes. The terminal includes but is not limited to a personal computer, a laptop computer, a smart phone, and a tablet computer. The terminal includes an identification module, a positioning module, a routing module, and an access module. The identification module responds to a microservice application access request and identifies the microservice application targeted by the microservice application access request, wherein one microservice application corresponds to one target microservice proxy node, and the target microservice proxy node is any microservice proxy node among multiple microservice proxy nodes deployed in the remote multi-active system. The positioning module is used to parse the microservice application access request through the target microservice proxy node, obtain microservice routing information, and locate the target microservice access node corresponding to the microservice application access request according to the microservice routing information. The routing module is used to parse the microservice application access request through the target microservice proxy node, obtain microservice routing information, and locate the target microservice access node corresponding to the microservice application access request according to the microservice routing information. The routing module is used to send the microservice application access request to the target microservice proxy node through the target microservice proxy node when the target microservice access node is successfully located. The request is routed to the target microservice access node so that the target microservice access node generates a microservice application access result corresponding to the microservice application access request, and sends the microservice application access result to the target microservice proxy node. The access module is used to access the microservice application according to the microservice application access result after the target microservice proxy node receives the microservice application access result. Through the information interaction between the identification module, the positioning module, the routing module and the access module, the target microservice proxy node acts as an interactive intermediary between the microservice application access request and the target microservice access node, that is, transparent access to the microservice application access request and forwarding of the microservice application access result are realized through the target microservice proxy node, so that the target microservice access node is not exposed to the microservice application access request. Therefore, the technical defect that the multi-active system in different locations is exposed to the microservice application access request directly, resulting in the risk of network attacks, and thus making it easy to leak microservice terminals or data, etc., is overcome. Therefore, the access security of microservice application access is improved. It can be understood that the method can also be applied to servers, and can also be applied to systems including terminals and servers, and is realized through the interaction between terminals and servers. In this embodiment, the method includes the following steps 202 to 208. Among them:

[0052] Step 202: In response to the microservice application access request, identify the microservice application targeted by the microservice application access request, wherein one microservice application corresponds to one target microservice proxy node.

[0053] It should be noted that in the multi-site active-active system, the explanations of relevant technical terms are as follows: 1) Access site, that is, the region to which the microservice proxy access node belongs. Different regions use different infrastructure examples, such as databases and gateways. 2) Unit, that is, a business namespace of the access site. A microservice unit is exposed to the network through its microservice access node. The microservice access node may belong to a specific business namespace, which contains other services and resources related to the microservice. It can be understood that all microservice units on the same site share the same infrastructure instance, such as databases and gateways, and users or customers When a client accesses a microservice application, it is actually interacting with one or more service units in the microservice application; 3) Unit group, the routing rules are defined with the unit as the basic unit. Different unit groups have different routing rules. When accessing the corresponding unit group service, routing must be performed according to the rules of the corresponding unit group; 4) Routing, that is, the user-defined routing label routerId, such as userId (user ID), and then the business scope is divided according to demand. It can be understood that each unit is only responsible for the implementation of a part of the business; 5) Multi-active proxy, that is, the microservice proxy node, which is started with the user application. It is a java probe for JVM (Java Virtual Machine) in a remote multi-active system. Java applications can access the probe to enable the application to quickly have the functions of multi-active database connection switching and RPC (Remote Procedure Call) request forwarding and error correction.

[0054] It should be noted that before accessing the microservice application, it is necessary to create a remote multi-active system and register the microservice application. For example, in an implementable method, assuming that the remote multi-active system is a shopping mall system, the creation process of the shopping mall system is as follows: 1) The user logs in to the remote multi-active system console and creates an initial shopping mall system, where unit A and unit B are created in the initial shopping mall system, A is the source access site, B is the multi-active access site, and the remote multi-active system console is presented in a visual form; 2) Create three unit groups of the front-end module, shopping cart module and order module in the initial shopping mall system, and set the user ID of the shopping cart module and the order module as the routing label, and the resolution strategy is to resolve the first parameter; 3) Perform A access site and B access 1) Import the environment configuration of the site, create a new data source and start data source synchronization; 2) Connect the front desk service, shopping cart service, order service and other microservice applications to multi-active, download the corresponding microservice proxy nodes for the front desk service, shopping cart service and order service respectively, and start the front desk service, shopping cart service and order service respectively, and observe whether they are successfully registered to the remote multi-active system console. Among them, a multi-active management and control connection data layer is created for each microservice application; 3) Complete the initial switching of the microservice application traffic, and switch the shopping cart traffic and order traffic of the user with user ID x to site A. Among them, the shopping cart traffic refers to the application traffic under the shopping cart microservice application, and the order traffic refers to the application traffic under the order microservice application. Refer to Figure 2 , Figure 2 The schematic diagram of the mall system architecture shows that the request processing server is responsible for processing microservice application access requests. Microservice applications such as the front desk service, shopping cart service, and order service are all registered in the registration center. The front desk service corresponds to microservice proxy node 1, the shopping cart service corresponds to microservice proxy node 2, and the order service corresponds to microservice proxy node 3. When each microservice makes an RPC call, the multi-active proxy will parse the HTTP (or other types) request according to the multi-active routing rules, and calculate the target site according to the routing label and rules obtained by the analysis. Then, forward according to the RPC service address corresponding to the target site, and pass the routing label within the application.

[0055] It should be noted that the microservice application access request can be sent periodically by the user terminal or actively by the user terminal, and can be used specifically to request access to the microservice application. For example, in one feasible method, the microservice application request can be triggered by the user clicking on the shopping cart operation to access the shopping cart service. The microservice application targeted by the microservice application access request can be determined by identifying the microservice application identification information carried in the microservice application access request, wherein the microservice application identification information can specifically be a URL, path or other information in the request. When the microservice application is identified, the target microservice proxy node can be determined based on the one-to-one correspondence between the microservice application and the microservice proxy node. It can be understood that when the microservice application access request targets different microservice applications, any of the multiple microservice proxy nodes can be used as the target microservice proxy node.

[0056] As an example, step 202 includes: in response to a microservice application access operation, generating a microservice application access request, extracting microservice application identification information from the microservice application access request, querying the microservice application targeted by the microservice application access request based on the microservice application identification information, and determining a target microservice proxy node from multiple microservice proxy nodes based on a mapping relationship between the microservice application and the microservice proxy node.

[0057] Step 204: parse the microservice application access request through the target microservice proxy node to obtain microservice routing information, and locate the target microservice access node corresponding to the microservice application access request according to the microservice routing information.

[0058] It should be noted that, since the routing mark of the microservice access node has been established during the creation process of the multi-active system in different locations, the target microservice access node can be located by parsing the microservice application access request through the target microservice proxy node. It can be understood that the target microservice access node can be one or more, that is, the microservice application requested to be accessed by the microservice application access request can be provided by one or more microservice access nodes, among which the microservice routing information can specifically be user ID information or terminal identification information, etc.

[0059] As an example, step 204 includes: parsing the microservice application access request through the target microservice proxy node to obtain microservice routing information, and querying the target microservice access node corresponding to the microservice application access request based on the microservice routing information, wherein the target microservice access node refers to the actual response end of the microservice application access request.

[0060] Step 206, when the target microservice access node is successfully located, the microservice application access request is routed to the target microservice access node through the target microservice proxy node, so that the target microservice access node generates a microservice application access result corresponding to the microservice application access request, and sends the microservice application access result to the target microservice proxy node.

[0061] It should be noted that, under normal circumstances, if the microservice application under the target microservice access node has completed registration in the registration center during the creation phase, the microservice routing information will be fed back by the target microservice proxy node with a successful query result during the process of querying the target microservice access node. At this time, it indicates that the target microservice access node has been successfully located. However, if the microservice application under the target microservice access node has been offline in the registration center or a network failure occurs during the query process, the server routing information will be fed back by the target microservice proxy node with a failed query result during the process of querying the target microservice access node. At this time, it indicates that the target microservice access node has failed to be located. When the target microservice access node is successfully located, the target microservice proxy node can complete the routing of the microservice application access request based on the communication mechanism and wait for the receipt of the microservice application access result. It can be understood that the microservice application access result can specifically be a successful access result or an access failure result.

[0062] As an example, step 206 includes: upon receiving a successful query result fed back by the target microservice access node, determining that the target microservice access node is successfully located, routing the microservice application access request to the target microservice access node through the target microservice proxy node, so that the target microservice node generates a microservice application access result corresponding to the microservice application access request according to the target microservice access node, and sending the microservice application access result to the target microservice proxy node.

[0063] Step 208: After the target microservice proxy node receives the microservice application access result, the target microservice proxy node accesses the microservice application according to the microservice application access result.

[0064] It should be noted that after the target microservice proxy node receives the microservice application access result, if the microservice application access result is a successful access result, the microservice application resources required for the microservice application access request can be returned; if the microservice application access result is an access failure result, the access exception prompt information can be presented in a visual form, where the access exception prompt information can specifically be the words "access failure".

[0065] As an example, step 208 includes: after the target microservice proxy node receives the microservice application access result, if the microservice application access result is a successful access result, then according to the microservice application access result, access the application resources provided by the microservice application; if the microservice application access result is an access failure result, then according to the microservice application access result, display access exception prompt information.

[0066] In the above-mentioned microservice application access method, a microservice application access request is first responded to, and the microservice application identification information carried in the microservice application access request is used to identify the microservice application targeted by the microservice application access request and the target microservice proxy node that has a one-to-one mapping relationship with the microservice application. The microservice application access request is then parsed through the target microservice proxy node to obtain microservice routing information, and the target microservice access node corresponding to the microservice application access request is queried based on the microservice routing information. When the query result of querying the target microservice access node based on the microservice routing information is a successful query result, it is determined that the target microservice access node is successfully located, and then the microservice application access request is routed to the target microservice access node through the target microservice proxy node, so that the target microservice access node can generate the corresponding microservice application access result based on the microservice application access request, and send the microservice application access result to the target microservice proxy node. Finally, after the target microservice proxy node receives the microservice application access result, the access to the microservice application is completed according to the microservice application access result. Since the microservice application access request is forwarded to the target microservice access node by the target microservice proxy node, and the microservice application access result generated by the target microservice access node is also fed back through the target microservice proxy node, the target microservice access node is not exposed to the microservice application access request. Therefore, by introducing the target microservice access node, the purpose of transparent access and forwarding to the microservice application is achieved, instead of requiring direct interaction between the microservice node and the microservice application access request to achieve access to the microservice application. Therefore, the technical defect that the multi-active system in different locations is exposed to the microservice node directly, resulting in the risk of network attacks, and thus prone to microservice terminals or data leakage, is overcome. Therefore, the access security of microservice application access is improved.

[0067] In one embodiment, Figure 3 As shown, the microservice routing information includes first microservice routing information and second microservice routing information; locating the target microservice access node corresponding to the microservice application access request according to the microservice routing information includes:

[0068] Step 302: query the target access site of the microservice application access request according to the first microservice routing information.

[0069] It should be noted that since the multi-active system in different locations usually involves multiple regions, in order to avoid the access disorder problem of microservice application access requests, the first microservice routing information and the second microservice routing information can be set in the microservice routing information to distinguish the microservice access nodes under different multi-active access sites, wherein the first microservice routing information is used to query the target access site of the microservice application access request. It can be understood that the same or different routing rules can be set for different target access sites, and the first microservice routing information can specifically be a site identifier.

[0070] As an example, step 302 includes: using the first microservice routing information as an index, querying a target access site of the microservice application access request.

[0071] Step 304: locate the target microservice access node at the target access site according to the second microservice routing information.

[0072] It should be noted that the second microservice routing information is used to identify the specific path of the microservice access node. The second microservice routing information can be a user ID or a node identifier, etc. It can be understood that the second microservice routing information can index multiple microservice access nodes as the target microservice access node.

[0073] As an example, step 304 includes: using the second microservice routing information as an index, querying a target access site to obtain multiple microservice access nodes, and using the multiple microservice access nodes as target microservice access nodes.

[0074] In this embodiment, in the process of locating the target microservice access node corresponding to the microservice application access request based on the microservice routing information, the target access site of the microservice application access request and the target microservice access node under the target access site can be queried respectively based on different types of microservice routing information, thereby avoiding the situation where the target microservice access node positioning error occurs due to the same microservice application under the microservice access nodes of different multi-active access sites, and the purpose of accurately locating the target microservice access node of the microservice application access request through the target microservice proxy node can be achieved. Therefore, while improving the access security of microservice application access, the access accuracy of microservice application access is also improved simultaneously.

[0075] In one embodiment, locating a target microservice access node at a target access site according to the second microservice routing information includes:

[0076] The total application traffic of the microservice application is extracted from the microservice application access request; according to the second microservice routing information, multiple available microservice access nodes under the target access site are queried; according to the total application traffic, multiple microservice collaborative access nodes are selected from the multiple available microservice access nodes, wherein the total application traffic and the sum of the application traffic shares corresponding to the multiple microservice collaborative access nodes are the same, and the application traffic shares between different microservice collaborative access nodes satisfy a preset traffic allocation relationship; and the multiple microservice collaborative access nodes are collectively used as target microservice access nodes.

[0077] It should be noted that in some application scenarios, the total application traffic requested by a microservice application access request may exceed the traffic that a single microservice access node can carry. In this case, the collaboration of multiple microservice access nodes is required to support the microservice application access request. Therefore, the corresponding application traffic shares can be allocated to different microservice collaborative access nodes to achieve load balancing and achieve a complete response to the microservice application access request. Among them, the available microservice access node refers to the microservice access node that can provide the application traffic share for the microservice application access request, and the microservice collaborative access node refers to the microservice access node that collaboratively provides application traffic for the microservice application access request. The present invention relates to a microservice collaborative access node with a share of application traffic, wherein the total application traffic is the same as the sum of the application traffic shares corresponding to each of the multiple microservice collaborative access nodes, and the application traffic shares between different microservice collaborative access nodes satisfy a preset traffic distribution relationship. For example, in an implementable manner, assuming that the microservice collaborative access nodes include X1, X2, and X3, and the traffic carrying capacity of each microservice collaborative access node is the same, the total application traffic is T, the preset traffic distribution relationship is 1:1:1, and the application traffic shares of the microservice collaborative access nodes X1, X2, and X3 are t1, t2, and t3 respectively, then t1=t2=t3, t1+t2+t3=T.

[0078] As an example, the total application traffic of the microservice application is extracted from the microservice application access request; the second microservice routing information is used as an index to query multiple available microservice access nodes under the target access site; based on the total application traffic, multiple microservice collaborative access nodes are selected from the multiple available microservice access nodes, and the multiple microservice collaborative access nodes are allocated their respective corresponding application traffic shares, wherein the total application traffic and the sum of the application traffic shares corresponding to the multiple microservice collaborative access nodes are the same, and the application traffic shares between different microservice collaborative access nodes satisfy a preset traffic allocation relationship; and the multiple microservice collaborative access nodes are collectively used as target microservice access nodes.

[0079] In this embodiment, in an application scenario where multiple microservice access nodes collaboratively respond to a microservice application access request, the total application traffic of the microservice application is first extracted through the microservice application request, and then multiple microservice collaborative access nodes are selected from multiple available microservice access nodes identified by the second microservice routing information through the total application traffic, and the application traffic share between different microservice collaborative access nodes is set, and finally multiple microservice collaborative access nodes are used as target microservice access nodes together, so as to achieve the purpose of locating the target microservice access node that fully responds to the microservice application access request among multiple microservice access nodes with load balancing as the guide. Therefore, while improving the access security of microservice application access, the access flexibility of microservice application access is also improved.

[0080] In one embodiment, when the target microservice access node is successfully located, before routing the microservice application access request to the target microservice access node through the target microservice proxy node, the method further includes:

[0081] When it is detected that the target access site meets the preset routing conditions, it is determined that the target microservice access node is successfully located; when it is detected that the target access site does not meet the preset routing conditions, it is determined that the target microservice access node has failed to be located, and the request exception result of the microservice application access request is output.

[0082] It should be noted that after locating the target microservice access node of the target access site according to the second microservice routing information, in order to improve the security of access, the location verification of the target microservice access node can be further performed, so that different access processing operations are performed based on different verification results, wherein the preset routing conditions can be set by the user based on needs. For example, in one feasible method, after the traffic is routed to the target access site and the shopping cart service (target microservice access site) receives the request, the multi-active proxy obtains the routing label (user ID) according to the routing resolution strategy, and calculates whether the target access site is this site, and releases the microservice application response request when it is calculated that the target access site is this site, that is, it is determined that the target microservice access node is successfully located, so that the microservice application access request is routed to the target microservice access node through the target microservice proxy node, and when the target access site does not meet the preset routing conditions, an exception is thrown, and the user cannot access the microservice application at this time.

[0083] As an example, when the target access site is detected as the source access site through the target microservice proxy node, it is determined that the target microservice access node is successfully located; when the target access site is detected as not the source access site through the target microservice proxy node, it is determined that the target microservice access node is failed to be located, and the request exception result of the microservice application access request is output.

[0084] In an implementable manner, assuming that the remote multi-active system is a shopping mall system, the overall process of successfully locating the target microservice access node during the microservice application access process can be as follows: 1) The user logs in to the shopping mall system using an account with ID x and clicks the add shopping cart operation to generate a microservice application access request; 2) When the request reaches the shopping cart service, the multi-active proxy obtains the routing label (user ID) of the request according to the routing resolution strategy, and calculates the target site as access site A; 3) The traffic is routed to site A. After the shopping cart service receives the request, the multi-active proxy obtains the routing label (user ID) according to the routing resolution strategy, and calculates the target site as this site. The request is released (the target microservice access node is successfully located); 4) The user with user ID x can add shopping carts and place orders normally. During the microservice application access, the overall process of successfully locating the target microservice access node can be as follows: 1) The multi-active proxy will automatically de-register the order service of site A; 2) Continue to use the user with ID x to place orders; 3) When the request reaches the order service, the multi-active proxy obtains the routing label (user ID) according to the routing resolution strategy and calculates the target site as site A; 4) However, the order service of site A cannot be found according to the site query, so an exception is thrown and the user cannot place an order.

[0085] In this embodiment, before the target microservice proxy node routes the microservice application access request, it can determine whether the target microservice access node is successfully located based on the correspondence between the target access site and the preset routing conditions, and take corresponding access processing measures to perform access processing based on the positioning result of the target microservice access node, thereby ensuring that the microservice application access request is routed only when the target microservice access node is successfully located, thereby further improving the access security of microservice application access.

[0086] In one embodiment, the method further comprises:

[0087] After determining that the target microservice access node fails to be located, select a backup access site for the microservice application access request from the multiple multi-active access sites according to the site information of the multiple multi-active access sites; when it is detected that the backup access site meets the preset routing conditions, update the microservice routing information according to the backup access site to obtain the updated microservice routing information; locate the target microservice access node corresponding to the microservice application access request according to the updated microservice routing information:

[0088] It should be noted that after the target microservice access node fails to be located, in order to ensure the normal response to the microservice application access request, a backup access site can be selected in the multi-active off-site system, and the microservice application access request can be responded to through the backup microservice node of the backup access site, thereby achieving the purpose of switching the microservice access node for the microservice application access request under abnormal circumstances. It can be understood that in the process of switching the microservice access node, the microservice routing information needs to be updated synchronously to ensure the correct routing of the microservice application access request by the target microservice proxy node, where the site information can specifically be site operation status information, which can specifically be idle operation, moderate operation or busy operation, etc. For example, a relatively idle multi-active access site is randomly selected as a backup access site.

[0089] As an example, after determining that the target microservice access node has failed to be located, the site priorities of the multiple multi-active access sites are determined based on the site operation status information of the multiple multi-active access sites, and based on the site priorities, a backup access site for the microservice application access request is selected from the multiple multi-active access sites; when it is detected that the backup access site meets the preset routing conditions, the microservice routing information is updated based on the backup access site to obtain updated microservice routing information; using the updated microservice routing information as an index, the target microservice access node corresponding to the microservice application access request is queried.

[0090] In an implementable manner, the switching process of microservice access node switching is as follows: 1) The order traffic of user ID x is switched to site B; 2) The multi-active proxy receives the latest routing rules and caches them locally; 3) User ID x continues to place orders. When the request reaches the order service, the multi-active proxy obtains the routing label (user ID) according to the routing resolution strategy and calculates the target site as site B; 4) At this time, the service of site B is normal, the request is passed to site B for further processing, and the user can place an order.

[0091] In this embodiment, when the location of the target microservice access node fails, a backup access site is selected from multiple multi-active access sites in the remote multi-active system to achieve a complete response to the microservice application request. In the case of an abnormality in the target microservice access node, the user's normal access to the microservice application can still be guaranteed. Therefore, while laying the foundation for improving the access security of microservice application access, the access stability of microservice application access is improved.

[0092] In one embodiment, the site information includes site operation status information and site location information; selecting a standby access site for a microservice application access request from the multiple multi-active access sites according to the site information of the multiple multi-active access sites includes:

[0093] According to the site location information, a first switching evaluation index of multiple multi-active access sites is generated, wherein the first switching evaluation index is used to characterize the distance between the multi-active access site and the target access site; according to the site operation status information, a second switching evaluation index of multiple multi-active access sites is generated, wherein the second switching evaluation index is used to characterize the operation status of the multi-active access site; for any multi-active access site, the first switching evaluation index and the second switching evaluation index are merged according to the indicator weights corresponding to each of the first switching evaluation index and the second switching evaluation index to obtain a total switching evaluation index of the multi-active access site, wherein the total switching evaluation index is used to characterize the degree of switching matching between the multi-active access site and the target access site; according to the indicator ranking results of all the total switching evaluation indicators, a backup access site for the microservice application access request is selected from the multiple multi-active access sites.

[0094] It should be noted that since the compatibility between the backup access site and the target access site is affected by multiple factors, such as site stability, data transmission efficiency, bandwidth capacity, security, and cost-effectiveness, in the process of selecting the backup access site, it is necessary to quantitatively select the multi-active access site that best matches the target access site as the backup access site based on considerations of multiple dimensions, wherein the quantitative evaluation index is the total switching evaluation index, and the total switching evaluation index is used to characterize the switching matching degree between the multi-active access site and the target access site, that is, the switching matching degree can be comprehensively determined from two aspects: the capability of the multi-active access site itself and the correlation between the multi-active access site and the target access site. It can be understood that since the correlation aspect and the site's own capability have different influences on the response of the microservice application response request, different indicator weights can be set for the quantitative indicators of the two aspects. Finally, after quantitatively evaluating the switching matching degree between multiple multi-active access sites and the target access site, a relatively adaptable multi-active access site among multiple multi-active access sites can be selected as the backup access site for the microservice application request based on the indicator sorting result.

[0095] As an example, based on the site location information, the first site location of multiple multi-active access sites is determined, and based on the multiple first site locations and the second site location of the target access site, the site distance between the multiple multi-active access sites and the target access site is determined, and the site distance is mapped to a first switching evaluation indicator, wherein the first switching evaluation indicator is used to characterize the distance between the multi-active access site and the target access site; the site operation status information is mapped to a second switching evaluation indicator of the multiple multi-active access sites, wherein the second switching evaluation indicator is used to characterize the operation status of the multi-active access site; for any multi-active access site, the first switching evaluation indicator and the second switching evaluation indicator are weightedly fused according to the indicator weights corresponding to each of the first switching evaluation indicator and the second switching evaluation indicator to obtain a total switching evaluation indicator for the multi-active access site; the total switching evaluation indicators of the multiple multi-active access sites are sorted to obtain an indicator sorting result, and according to the indicator sorting result, a backup access site for the microservice application access request is selected from the multiple multi-active access sites.

[0096] In this embodiment, in the process of selecting a backup access site, different site information is used to generate a switching evaluation index that quantitatively evaluates the switching matching degree between the multi-active access site and the target access site from different dimensions, and then based on the indicator weights of different switching evaluation indicators, different switching evaluation indicators are integrated to obtain multiple switching evaluation total indicators. Finally, based on the indicator ranking results of multiple switching evaluation total indicators, the backup access site for the microservice application access request can be selected from multiple multi-active access sites. That is, the selected backup access site is the multi-active access site with the highest relative adaptability to the target access site, so the access stability of the microservice application access is further improved.

[0097] In one practicable manner, referring to Figure 4 , Figure 4 To represent the access flow chart of microservice application access, it shows the division into different site units and unit groups in the remote multi-active system console, and defines the routing label resolution rules and traffic ratio of each unit; imports the environment configuration at the source site and multi-active site, including data source configuration and data synchronization configuration, and starts the application of each site; each multi-active proxy will automatically intercept the registration behavior and report the application information to the multi-active system console through the command distribution channel. After receiving the complete service list, the multi-active system console will update the remote multi-active routing cache; when the application is closed, the multi-active proxy will automatically remove the application information from the multi-active console.

[0098] It can be understood that the following technical effects can be achieved based on this embodiment: 1) Reducing transformation costs: Compared with the traditional multi-active disaster recovery method, the proxy-based design method has less intrusion on the original system, and there is no need to carry out large-scale transformation of the existing business logic, which reduces the transformation cost; Transparent access and forwarding: 2) The proxy node transparently receives external requests and forwards them to the corresponding microservice node. For external users, the access method of the system has not changed, and it can still be accessed through a unified access point; 3) Data and state replication: By deploying proxy nodes in data centers in different geographical locations and replicating and synchronizing application node data and state, it is ensured that the system can continue to provide services and maintain data consistency in the event of a failure or disaster; 4) Simplifying debugging and operation and maintenance: The proxy-based design method encapsulates the complexity of the system inside the proxy node, simplifies the debugging and operation and maintenance of the system, and improves the maintainability and manageability of the system; In summary, the proxy-based microservice multi-active disaster recovery system and method greatly reduces the transformation cost while improving the reliability and availability of the system, and provides an effective solution for enterprises in building reliable distributed systems.

[0099] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0100] Based on the same inventive concept, the embodiment of the present application also provides a microservice application access device for implementing the microservice application access method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more microservice application access device embodiments provided below can refer to the limitations of the microservice application access method above, and will not be repeated here.

[0101] In an exemplary embodiment, Figure 5 As shown, a microservice application access device is provided, which is applied to a remote multi-active system, wherein the remote multi-active system is deployed with multiple microservice proxy nodes, including: an identification module 401, a positioning module 402, a routing module 403 and an access module 404, wherein:

[0102] An identification module 401 is used to identify, in response to a microservice application access request, a microservice application targeted by the microservice application access request, wherein one microservice application corresponds to one target microservice proxy node;

[0103] The positioning module 402 is used to parse the microservice application access request through the target microservice proxy node to obtain microservice routing information, and locate the target microservice access node corresponding to the microservice application access request according to the microservice routing information;

[0104] The routing module 403 is used to route the microservice application access request to the target microservice access node through the target microservice proxy node when the target microservice access node is successfully located, so that the target microservice access node can generate a microservice application access result corresponding to the microservice application access request, and send the microservice application access result to the target microservice proxy node;

[0105] The access module 404 is used to access the microservice application according to the microservice application access result after the target microservice proxy node receives the microservice application access result.

[0106] In one embodiment, the microservice routing information includes first microservice routing information and second microservice routing information; the positioning module 402 is further used to:

[0107] According to the first microservice routing information, a target access site of the microservice application access request is queried; and according to the second microservice routing information, the target microservice access node is located at the target access site.

[0108] In one embodiment, the positioning module 402 is further configured to:

[0109] The total application traffic of the microservice application is extracted from the microservice application access request; according to the second microservice routing information, multiple available microservice access nodes under the target access site are queried; according to the total application traffic, multiple microservice collaborative access nodes are selected from the multiple available microservice access nodes, wherein the total application traffic is the same as the sum of the application traffic shares corresponding to each of the multiple microservice collaborative access nodes, and the application traffic shares between different microservice collaborative access nodes satisfy a preset traffic allocation relationship; the multiple microservice collaborative access nodes are collectively used as the target microservice access node.

[0110] In one embodiment, the microservice application access device is further used to:

[0111] When it is detected that the target access site meets the preset routing conditions, it is determined that the target microservice access node is successfully located; when it is detected that the target access site does not meet the preset routing conditions, it is determined that the target microservice access node has failed to be located, and the request exception result of the microservice application access request is output.

[0112] In one embodiment, the microservice application access device is further used to:

[0113] After determining that the target microservice access node fails to be located, select a backup access site for the microservice application access request from the multiple multi-active access sites based on site information of the multiple multi-active access sites; when it is detected that the backup access site meets the preset routing condition, update the microservice routing information according to the backup access site to obtain updated microservice routing information; and locate the target microservice access node corresponding to the microservice application access request based on the updated microservice routing information.

[0114] In one embodiment, the site information includes site operation status information and site location information; the microservice application access device is further used to:

[0115] According to the site location information, a first switching evaluation index of the multiple multi-active access sites is generated, wherein the first switching evaluation index is used to characterize the distance between the multi-active access site and the target access site; according to the site operation status information, a second switching evaluation index of the multiple multi-active access sites is generated, wherein the second switching evaluation index is used to characterize the operation status of the multi-active access site; for any of the multi-active access sites, according to the indicator weights corresponding to the first switching evaluation index and the second switching evaluation index, the first switching evaluation index and the second switching evaluation index are merged to obtain a total switching evaluation index of the multi-active access site, wherein the total switching evaluation index is used to characterize the degree of switching matching between the multi-active access site and the target access site; according to the indicator ranking results of all total switching evaluation indicators, a backup access site for the microservice application access request is selected from the multiple multi-active access sites.

[0116] Each module in the above-mentioned microservice application access device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[0117] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface, the display unit and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a microservice application access method is implemented. Those skilled in the art can understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0118] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0119] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0120] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0121] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0122] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0123] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A microservice application access method, characterized in that: Applied to a remote multi-active system, the remote multi-active system is deployed with multiple microservice proxy nodes, and the method includes: In response to a microservice application access request, identifying a microservice application targeted by the microservice application access request, wherein one of the microservice applications corresponds to one target microservice proxy node; Parsing the microservice application access request through the target microservice proxy node to obtain microservice routing information, and locating the target microservice access node corresponding to the microservice application access request according to the microservice routing information; When the target microservice access node is successfully located, the microservice application access request is routed to the target microservice access node through the target microservice proxy node, so that the target microservice access node generates a microservice application access result corresponding to the microservice application access request, and sends the microservice application access result to the target microservice proxy node; After the target microservice proxy node receives the microservice application access result, the target microservice proxy node accesses the microservice application according to the microservice application access result, wherein the microservice routing information includes first microservice routing information and second microservice routing information; locating the target microservice access node corresponding to the microservice application access request according to the microservice routing information includes: According to the first microservice routing information, query the target access site of the microservice application access request; The step of locating the target microservice access node at the target access site according to the second microservice routing information, wherein the step of locating the target microservice access node at the target access site according to the second microservice routing information includes: Extracting the total application traffic of the microservice application from the microservice application access request; According to the second microservice routing information, query multiple available microservice access nodes under the target access site; According to the total application traffic, multiple microservice collaborative access nodes are selected from the multiple available microservice access nodes, wherein the total application traffic is the same as the sum of the application traffic shares corresponding to each of the multiple microservice collaborative access nodes, and the application traffic shares between different microservice collaborative access nodes satisfy a preset traffic allocation relationship; The multiple microservice collaborative access nodes are collectively used as the target microservice access node.

2. The method according to claim 1, characterized in that When the target microservice access node is successfully located, before routing the microservice application access request to the target microservice access node through the target microservice proxy node, the method further includes: When it is detected that the target access site meets the preset routing condition, it is determined that the target microservice access node is successfully located; When it is detected that the target access site does not satisfy the preset routing condition, it is determined that the positioning of the target microservice access node has failed, and a request exception result of the microservice application access request is output.

3. The method according to claim 2, characterized in that The method further comprises: After determining that the target microservice access node fails to be located, selecting a backup access site for the microservice application access request from the multiple multi-active access sites according to site information of the multiple multi-active access sites; When it is detected that the standby access site meets the preset routing condition, the microservice routing information is updated according to the standby access site to obtain updated microservice routing information; According to the updated microservice routing information, a target microservice access node corresponding to the microservice application access request is located.

4. The method according to claim 3, characterized in that The site information includes site operation status information and site location information; the selecting a standby access site for the microservice application access request from the multiple multi-active access sites according to the site information of the multiple multi-active access sites includes: Generate a first switching evaluation index of the multiple active-active access sites according to the site location information, wherein the first switching evaluation index is used to characterize the distance between the active-active access site and the target access site; Generate a second switching evaluation index of the multiple active-active access sites according to the site operation status information, wherein the second switching evaluation index is used to characterize the operation status of the multiple active-active access sites; For any of the multi-active access sites, the first switching evaluation indicator and the second switching evaluation indicator are merged according to the indicator weights corresponding to the first switching evaluation indicator and the second switching evaluation indicator, so as to obtain a total switching evaluation indicator of the multi-active access site, wherein the total switching evaluation indicator is used to characterize the degree of switching matching between the multi-active access site and the target access site; According to the index ranking result of all switching evaluation total indicators, a backup access site for the microservice application access request is selected from the multiple multi-active access sites.

5. A microservice application access device, characterized in that: Applied to a remote multi-active system, the remote multi-active system is deployed with multiple microservice proxy nodes, and the device includes: an identification module, configured to identify, in response to a microservice application access request, a microservice application to which the microservice application access request is directed, wherein one of the microservice applications corresponds to one target microservice proxy node; A positioning module, used to parse the microservice application access request through the target microservice proxy node, obtain microservice routing information, and locate the target microservice access node corresponding to the microservice application access request according to the microservice routing information; A routing module, for routing the microservice application access request to the target microservice access node through the target microservice proxy node when the target microservice access node is successfully located, so that the target microservice access node generates a microservice application access result corresponding to the microservice application access request, and sends the microservice application access result to the target microservice proxy node; an access module, configured to access the microservice application according to the microservice application access result after the target microservice proxy node receives the microservice application access result, wherein the microservice routing information includes first microservice routing information and second microservice routing information; and the positioning module is further configured to: According to the first microservice routing information, query the target access site of the microservice application access request; according to the second microservice routing information, locate the target microservice access node at the target access site, wherein the positioning module is also used to: extract the total application traffic of the microservice application in the microservice application access request; according to the second microservice routing information, query multiple available microservice access nodes under the target access site; according to the total application traffic, select multiple microservice collaborative access nodes from the multiple available microservice access nodes, wherein the total application traffic is the same as the sum of the application traffic shares corresponding to each of the multiple microservice collaborative access nodes, and the application traffic shares between different microservice collaborative access nodes satisfy a preset traffic allocation relationship; and use the multiple microservice collaborative access nodes collectively as the target microservice access node.

6. The device according to claim 5, characterized in that The microservice application access device is also used for: When it is detected that the target access site meets the preset routing condition, it is determined that the target microservice access node is successfully located; When it is detected that the target access site does not satisfy the preset routing condition, it is determined that the positioning of the target microservice access node has failed, and a request exception result of the microservice application access request is output.

7. The device according to claim 6, characterized in that The microservice application access device is also used for: After determining that the target microservice access node fails to be located, selecting a backup access site for the microservice application access request from the multiple multi-active access sites according to site information of the multiple multi-active access sites; when it is detected that the backup access site meets the preset routing condition, updating the microservice routing information according to the backup access site to obtain updated microservice routing information; According to the updated microservice routing information, a target microservice access node corresponding to the microservice application access request is located.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Method and device for processing access request packet on node of micro-service cluster

    CN107483538A

  • Traffic distribution method and device suitable for gray release and computer equipment

    CN118250329A