System based on service grid communication and gateway flow processing method

By clarifying the traffic proxy and routing between API gateway and service mesh gateway components in the microservice architecture, the problem of overlapping functions in the containerized gateway application is solved, and the specifications of traffic governance and system flexibility and ability are realized. Maintenance.

CN119094592APending Publication Date: 2024-12-06PING AN BANK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411193845.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

In the microservice architecture, after the gateway application is containerized, since the container cloud base and service mesh both have gateway components, it is difficult to distinguish and maintain components with overlapping functions such as request routing, current limit fuse, protocol conversion and other functions.

Method used

By clarifying traffic proxying and routing between the gateway components of the API gateway and the service mesh, the API gateway proxys the front-end WEB transaction request to the gateway component of the service mesh, and the service mesh gateway component then routes the request to the corresponding service system micro Service, using the side car model to separate business logic and infrastructure functions.

Benefits of technology

It standardizes the traffic trend and governance implementation, realizes the separation of technical logic and business logic, solves the precise implementation of overlapping functions, and improves the flexibility and maintainability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094592A_ABST
    Figure CN119094592A_ABST
Patent Text Reader

Abstract

The invention discloses a service grid communication-based system and a gateway traffic processing method, and the method comprises the steps: determining the traffic processed by an API gateway and a gateway assembly of a service grid, and enabling the API gateway to agency the traffic of a front-end WEB transaction request to the gateway assembly of the service grid, and then a gateway component of the service grid routes a front-end WEB transaction request to a micro-service of a corresponding business system, so that a traffic trend and a governance implementation scene are standardized, separation of technical logic and business logic is realized through the service grid, an invasive pain point of a technical framework is solved for business development, and meanwhile, the business development efficiency is improved. According to the method and the device, the accurate setting of the coincidence capability is clear, and the technical problem that after a gateway is applied to a container, since a container cloud base has a flow gateway of the container cloud base and a service grid also has a gateway component, the components with coincidence functions of implementation and maintenance request routing, flow limiting fusing and protocol conversion are difficult to distinguish is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network architecture technology, and in particular to a system and gateway traffic processing method based on service grid communication. Background Art

[0002] Microservice architecture is an approach to developing applications as a set of small services, each of which runs in its own independent process and is usually organized around business capabilities. These services can be deployed, scaled, and updated independently.

[0003] The API gateway is a server that is the only entry point to the system. All requests from the client to the backend service will pass through this gateway. The API gateway can handle multiple responsibilities, including but not limited to: authentication and authorization: ensuring that only legitimate requests can access the backend service; request routing: forwarding requests to the correct service; current limiting and circuit breaking: controlling traffic to prevent service overload; caching: improving response speed and reducing requests to the backend service; protocol conversion: allowing clients to interact with services using different communication protocols.

[0004] With the development of microservice architecture, API gateway applications have become increasingly popular. As a unified traffic entrance for the entire system, the API gateway encapsulates the internal details of the system, provides an API portal for the access party, declares the definition of the interface in the design state, and also assumes the interface call governance function in the running state. It can provide applications with unified health checks, collection and reporting, link tracking, service discovery, load balancing, parameter routing, grayscale release, traffic mirroring, current limiting and circuit breaking, security encryption, protocol conversion, caching and other functions.

[0005] At the same time, containerization and service mesh have become an established trend in cloud-native microservice architecture. Containerization is the packaging of applications and their dependencies into a lightweight, portable container, allowing applications to run on any platform that supports containers. Service mesh is an infrastructure layer specifically designed to handle inter-service communication. It provides a way to manage interactions between services in a way that is separate from business logic.

[0006] The service mesh can be used to separate technical logic from business logic, solving the invasive pain points of the technical framework for business development. The cloud native base and service mesh as the technical foundation can also provide unified health checks, collection and reporting, link tracking, service discovery, load balancing, parameter routing, grayscale release, traffic mirroring, current limiting and circuit breaking, secure encryption, protocol conversion, caching and other capabilities.

[0007] After the container is applied to the gateway, the container cloud base itself has its own traffic gateway, and the service grid also has a gateway component. So which component should the overlapping functions, such as request routing, current limiting and circuit breaking, protocol conversion, etc., be maintained and implemented on? How to position each component in the overall architecture is a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0008] The present application provides a system and gateway traffic processing method based on service grid communication, which solves the technical problem that after the gateway application is on the container, because the container cloud base has its own traffic gateway and the service grid also has a gateway component, it is difficult to distinguish and implement and maintain the overlapping functions of request routing, current limiting and fusing, and protocol conversion.

[0009] In view of this, the first aspect of the present application provides a system based on service grid communication, the system comprising:

[0010] API gateway, gateway components of the service grid, and several business systems, each of which includes one or more microservices;

[0011] The API gateway is used to obtain the front-end WEB transaction request and proxy the traffic of the front-end WEB transaction request to the gateway component of the service grid;

[0012] The gateway component of the service grid is used to route the front-end WEB transaction request to the corresponding microservice of the business system.

[0013] Optionally, the microservice included in the business system is used to route the first service request directly to another microservice included in the business system.

[0014] Optionally, it also includes:

[0015] The API gateway is also used to perform routing access for second service requests between the microservices respectively included in two or more of the business systems.

[0016] Optionally, it also includes:

[0017] A domain gateway, wherein the domain gateway is arranged in the API gateway;

[0018] The domain gateway is used to perform routing access of the second service request between the microservices respectively included in two or more of the business systems.

[0019] Optionally, the API gateway adopts a sidecar mode to implement and maintain the traffic of the front-end WEB transaction request.

[0020] Optionally, the gateway component of the service grid adopts a sidecar mode to implement and maintain the traffic of the front-end WEB transaction request routed to the microservice of the business system.

[0021] Optionally, the gateway component of the service grid adopts a sidecar mode to implement and maintain the traffic of the first service request.

[0022] Optionally, the API gateway is also used to implement and maintain the traffic of the second service request.

[0023] Optionally, the domain gateway is also used to implement and maintain the traffic of the second service request.

[0024] A second aspect of the present application provides a gateway traffic processing method based on service grid communication, which is applied to the system based on service grid communication according to any one of the first aspects of the present application, and the method includes:

[0025] Step S1, the API gateway obtains the front-end WEB transaction request, and proxies the traffic of the front-end WEB transaction request to the gateway component of the service grid;

[0026] Step S2: The gateway component of the service grid routes the front-end WEB transaction request to the microservice of the corresponding business system.

[0027] Optionally, it also includes:

[0028] A first service request between two or more microservices included in the business system is directly routed and accessed between the microservices.

[0029] Optionally, it also includes:

[0030] The API gateway routes access to the second service request between the microservices respectively included in two or more of the business systems.

[0031] Optionally, it also includes:

[0032] A domain gateway, wherein the domain gateway is arranged in the API gateway;

[0033] The domain gateway is used to route access to the second service requests between the microservices respectively included in two or more of the business systems.

[0034] Optionally, the API gateway adopts a sidecar mode to implement and maintain the traffic of the front-end WEB transaction request.

[0035] Optionally, the gateway component of the service grid adopts a sidecar mode to implement and maintain the traffic of the front-end WEB transaction request routed to the microservice of the business system.

[0036] Optionally, the gateway component of the service grid adopts a sidecar mode to implement and maintain the traffic of the first service request.

[0037] Optionally, the API gateway is also used to implement and maintain the traffic of the second service request.

[0038] Optionally, the domain gateway is also used to implement and maintain the traffic of the second service request.

[0039] The third aspect of the present application provides an API gateway, which is applied to the system based on service grid communication described in any one of the first aspect of the present application, and the API gateway is specifically used to obtain front-end WEB transaction requests and proxy the traffic of the front-end WEB transaction requests to the gateway component of the service grid.

[0040] Optionally, the API gateway is also used to route access to second service requests between microservices respectively included in two or more of the business systems.

[0041] Optionally, the API gateway adopts a sidecar mode to implement and maintain the traffic of the front-end WEB transaction request.

[0042] Optionally, the API gateway is also used to implement and maintain the traffic of the second service request.

[0043] The fourth aspect of the present application provides a service grid gateway component, which is applied to the service grid communication-based system described in any one of the first aspect of the present application, and the service grid gateway component is specifically used to route the traffic of the front-end WEB transaction request proxied by the API gateway to the microservice of the corresponding business system.

[0044] Optionally, the gateway component of the service grid adopts a sidecar mode to implement and maintain the traffic of the front-end WEB transaction request routed to the microservice of the business system.

[0045] A fifth aspect of the present application provides a gateway traffic processing device based on service grid communication, the device comprising a processor and a memory:

[0046] The memory is used to store program code and transmit the program code to the processor;

[0047] The processor is used to execute the steps of the gateway traffic processing method based on service grid communication as described in the second aspect according to the instructions in the program code.

[0048] In a sixth aspect, the present application provides a computer-readable storage medium, which is used to store program code, and the program code is used to execute the gateway traffic processing method based on service grid communication described in the second aspect above.

[0049] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0050] In the present application, a system and gateway traffic processing method based on service grid communication are provided, by clarifying the traffic processed by the API gateway and the gateway component of the service grid respectively, wherein the API gateway is used to proxy the traffic of the front-end WEB transaction request to the gateway component of the service grid, and then the gateway component of the service grid routes the front-end WEB transaction request to the microservice of the corresponding business system, thereby standardizing the traffic trend and the governance implementation scenario, and realizing the separation of technical logic and business logic through the service grid, solving the invasive pain points of the technical framework for business development, and clarifying the precise placement of overlapping capabilities, which solves the technical problem that after the gateway application is on the container, because the container cloud base has its own traffic gateway and the service grid also has a gateway component, it is difficult to distinguish and implement and maintain the overlapping functions of request routing, current limiting and fuse breaking, and protocol conversion. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 This is a system architecture diagram of a system based on service grid communication in an embodiment of the present application;

[0052] Figure 2 A method flow chart of a gateway traffic processing method based on service grid communication in an embodiment of the present application;

[0053] Figure 3 This is a structural diagram of a gateway traffic processing device based on service grid communication in an embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0055] This application designs a system and gateway traffic processing method based on service grid communication, which solves the technical problem that after the gateway application is installed with a container, since the container cloud base has its own traffic gateway and the service grid also has a gateway component, it is difficult to distinguish and implement and maintain the overlapping functions of request routing, current limiting and fusing, and protocol conversion.

[0056] For easier understanding, see Figure 1 , Figure 1 This is a system architecture diagram of a system based on service grid communication in an embodiment of the present application. Figure 1 As shown, specifically:

[0057] API gateway 101, gateway component 102 of service grid and several business systems 103, wherein business system 103 includes one or more microservices 104;

[0058] The API gateway 101 is used to obtain the front-end WEB transaction request and proxy the traffic of the front-end WEB transaction request to the gateway component 102 of the service grid;

[0059] The gateway component 102 of the service grid is used to route the front-end WEB transaction request to the microservice 104 of the corresponding business system 103.

[0060] It should be noted that all front-end WEB transaction requests from the Internet and the intranet first pass through the API gateway 101.

[0061] After receiving the front-end WEB request, the API gateway 101 does not directly access the microservice, but proxies the traffic to the gateway component 102 of the service grid.

[0062] The gateway component 102 of the service grid receives the request forwarded by the API gateway 101 and routes the request to the microservice 104 of the corresponding business system 103 according to the control plane instruction of the service grid.

[0063] As a north-south gateway, API Gateway 101 is responsible for connecting to the external network or inter-cluster traffic, managing business interfaces, and providing business-related functions such as permission authentication, session management, blacklists and whitelists. It focuses on request and response parameter declarations and emphasizes business boundaries.

[0064] The gateway component 102 of the service mesh serves as an east-west gateway, responsible for receiving traffic within the cluster. It does not focus on business boundaries, but focuses on microservice calls registered to the control plane, emphasizing infrastructure capabilities.

[0065] The gateway component 102 of the service grid performs service discovery based on the service registration information and distributes requests to the backend microservices through a load balancing strategy.

[0066] It is understandable that each microservice instance registers itself with the control plane of the service mesh when it starts, providing information such as the service name and instance address.

[0067] The control plane of a service mesh maintains a service registry through which other services can discover and access other services.

[0068] In addition, authentication and authorization between services can be implemented at the service mesh level to ensure that only legitimate services can be accessed.

[0069] Furthermore, it also includes:

[0070] A first service request between two or more microservices 104 included in a business system 103 is directly routed and accessed between the microservices 104 .

[0071] It should be noted that the interaction between different microservices within a subsystem does not need to go through the API gateway, but can communicate directly through the service mesh sidecar proxy.

[0072] The service mesh sidecar agent is responsible for implementing and maintaining the governance of this part of the traffic, including but not limited to traffic control, monitoring, security, etc.

[0073] When a service needs to call another service, it first queries the control plane of the service mesh for instance information of the target service.

[0074] The service grid selects a service instance to call based on a load balancing strategy (such as polling, random, least connection, etc.).

[0075] The service mesh can route requests to different service instances based on the configured routing rules.

[0076] A service mesh can replicate a portion of traffic to another service instance for testing or monitoring purposes.

[0077] The service grid can record call logs between services to facilitate troubleshooting and monitoring.

[0078] The service mesh can monitor the calls between services, including indicators such as response time and error rate.

[0079] The service grid can encrypt the communication between services to ensure the security of data transmission. It also provides end-to-end encryption to ensure the security of data during transmission.

[0080] When a problem occurs with a service instance, the service mesh can automatically cut off calls to that instance to prevent the fault from spreading.

[0081] The service mesh can automatically retry failed requests to improve the system's fault tolerance.

[0082] The control plane of the service mesh can dynamically adjust routing rules, load balancing strategies, etc. without restarting the service.

[0083] The service mesh can control the new version of the service to gradually replace the old version, reducing the risk of release.

[0084] The service mesh can control the proportion of traffic received by different versions of services as needed.

[0085] Furthermore, it also includes:

[0086] The API gateway 101 is also used to route access to second service requests between microservices 104 respectively included in two or more business systems 103 .

[0087] It should be noted that the backend microservice interactions between subsystems need to go through the API gateway 101, which implements and maintains traffic management.

[0088] Furthermore, it also includes:

[0089] Domain gateway: The domain gateway is set in the API gateway 101;

[0090] The domain gateway is used to route access to the second service requests between the microservices 104 respectively included in two or more business systems 103 .

[0091] It should be noted that the backend microservice interactions between subsystems need to go through the domain gateway, which implements and maintains traffic governance.

[0092] Based on the actual situation and needs of the subsystem, decide whether to build a domain gateway to handle specific north-south traffic.

[0093] Furthermore, the API gateway 101 adopts a sidecar mode to implement and maintain the traffic of front-end WEB transaction requests.

[0094] It should be noted that the sidecar pattern is a pattern that decouples applications from infrastructure support functions in the service mesh architecture. In this pattern, one or more sidecar agents run next to each microservice instance, which take on tasks related to the service mesh, while the microservices themselves focus on business logic.

[0095] The sidecar pattern of the API gateway is an innovative architectural design that aims to decouple the traffic processing and business logic of the API gateway and improve the flexibility and maintainability of the system. Specifically:

[0096] 1. Define API Gateway Functions

[0097] Traffic entry: API gateway serves as the unified entrance of the system and handles requests from the outside.

[0098] Business logic processing: The API gateway is responsible for business logic, such as authentication, authorization, routing, etc.

[0099] 2. Introducing the sidecar proxy

[0100] Sidecar proxy deployment: Deploy one or more sidecar proxies alongside the API Gateway instance, which handle service mesh-related tasks.

[0101] Separation of responsibilities: The sidecar proxy handles infrastructure functions such as network communication, security, and monitoring, while the API gateway focuses on business logic.

[0102] 3. Service Registration and Discovery

[0103] Register with the service mesh: The API Gateway and Sidecar Proxy register with the service mesh’s control plane when they start up.

[0104] Service Discovery: The sidecar proxy discovers other service instances through the service mesh’s control plane.

[0105] 4. Traffic proxy and routing

[0106] Request interception: The sidecar proxy intercepts all requests entering the API gateway.

[0107] Routing decisions: The sidecar proxy routes requests to the correct service instance based on the configuration of the service mesh control plane.

[0108] By adopting the sidecar mode for the API gateway, the business logic of the API gateway can be effectively separated from the infrastructure functions, improving the flexibility and maintainability of the system. At the same time, the sidecar proxy can provide more fine-grained traffic control and security policies, enhancing the observability and reliability of the system.

[0109] Furthermore, the gateway component 102 of the service grid adopts a sidecar mode to implement and maintain the traffic of the front-end WEB transaction request of the microservice 104 routed to the business system 103.

[0110] Furthermore, the gateway component 102 of the service grid adopts a sidecar mode to implement and maintain the traffic of the first service request.

[0111] It should be noted that the interaction between different microservices within a subsystem does not need to go through the API gateway, but can communicate directly through the service mesh sidecar proxy.

[0112] The service mesh sidecar agent is responsible for implementing and maintaining the governance of this part of the traffic, including but not limited to traffic control, monitoring, security, etc.

[0113] The service mesh sidecar proxy can also implement fine-grained traffic control such as retries, timeouts, and circuit breakers based on the configuration of the service mesh control plane.

[0114] Furthermore, the API gateway 101 is also used to implement and maintain the traffic of the second service request.

[0115] Furthermore, the domain gateway 105 is also used to implement and maintain the traffic of the second service request.

[0116] See also Figure 2 , Figure 2 This is a method flow chart of a gateway traffic processing method based on service grid communication in an embodiment of the present application. Figure 2 As shown, specifically:

[0117] Step S1, the API gateway obtains the front-end WEB transaction request, and proxies the traffic of the front-end WEB transaction request to the gateway component of the service grid;

[0118] Step S2: The gateway component of the service grid routes the front-end WEB transaction request to the microservice of the corresponding business system.

[0119] It should be noted that all front-end WEB transaction requests from the Internet and the intranet first pass through the API gateway.

[0120] After receiving the front-end WEB request, the API gateway does not directly access the microservice, but proxies the traffic to the gateway component of the service mesh.

[0121] The gateway component of the service mesh receives requests forwarded by the API gateway and routes the requests to the microservices of the corresponding business system according to the control plane instructions of the service mesh.

[0122] As a north-south gateway, the API gateway is responsible for connecting to the external network or inter-cluster traffic, managing business interfaces, and providing business-related functions such as permission authentication, session management, blacklists and whitelists. It pays attention to request and response parameter declarations and emphasizes business boundaries.

[0123] The gateway component of the service mesh serves as an east-west gateway, responsible for receiving traffic within the cluster. It does not focus on business boundaries, but focuses on microservice calls registered to the control plane, emphasizing infrastructure capabilities.

[0124] The gateway component of the service mesh performs service discovery based on service registration information and distributes requests to backend microservices through load balancing strategies.

[0125] It is understandable that each microservice instance registers itself with the control plane of the service mesh when it starts, providing information such as the service name and instance address.

[0126] The control plane of a service mesh maintains a service registry through which other services can discover and access other services.

[0127] In addition, authentication and authorization between services can be implemented at the service mesh level to ensure that only legitimate services can be accessed.

[0128] Furthermore, it also includes:

[0129] The microservice included in the business system is used to route the first service request directly to another microservice included in the business system.

[0130] It should be noted that the interaction between different microservices within a subsystem does not need to go through the API gateway, but can communicate directly through the service mesh sidecar proxy.

[0131] The service mesh sidecar agent is responsible for implementing and maintaining the governance of this part of the traffic, including but not limited to traffic control, monitoring, security, etc.

[0132] When a service needs to call another service, it first queries the control plane of the service mesh for instance information of the target service.

[0133] The service grid selects a service instance to call based on a load balancing strategy (such as polling, random, least connection, etc.).

[0134] The service mesh can route requests to different service instances based on the configured routing rules.

[0135] A service mesh can replicate a portion of traffic to another service instance for testing or monitoring purposes.

[0136] The service grid can record call logs between services to facilitate troubleshooting and monitoring.

[0137] The service mesh can monitor the calls between services, including indicators such as response time and error rate.

[0138] The service grid can encrypt the communication between services to ensure the security of data transmission. It also provides end-to-end encryption to ensure the security of data during transmission.

[0139] When a problem occurs with a service instance, the service mesh can automatically cut off calls to that instance to prevent the fault from spreading.

[0140] The service mesh can automatically retry failed requests to improve the system's fault tolerance.

[0141] The control plane of the service mesh can dynamically adjust routing rules, load balancing strategies, etc. without restarting the service.

[0142] The service mesh can control the new version of the service to gradually replace the old version, reducing the risk of release.

[0143] The service mesh can control the proportion of traffic received by different versions of services as needed.

[0144] Furthermore, it also includes:

[0145] The API gateway is also used to perform routing access for second service requests between microservices respectively included in two or more business systems.

[0146] It should be noted that the backend microservice interactions between subsystems need to go through the API gateway, which implements and maintains traffic management.

[0147] Furthermore, it also includes:

[0148] Domain gateway: The domain gateway is set in the API gateway;

[0149] The domain gateway is used to perform routing access for second service requests between microservices respectively included in two or more business systems.

[0150] It should be noted that the backend microservice interactions between subsystems need to go through the domain gateway, which implements and maintains traffic governance.

[0151] Based on the actual situation and needs of the subsystem, decide whether to build a domain gateway to handle specific north-south traffic.

[0152] Furthermore, the API gateway adopts the sidecar mode to implement and maintain the traffic of front-end WEB transaction requests.

[0153] It should be noted that the sidecar pattern is a pattern that decouples applications from infrastructure support functions in the service mesh architecture. In this pattern, one or more sidecar agents run next to each microservice instance, which take on tasks related to the service mesh, while the microservices themselves focus on business logic.

[0154] The sidecar pattern of the API gateway is an innovative architectural design that aims to decouple the traffic processing and business logic of the API gateway and improve the flexibility and maintainability of the system. Specifically:

[0155] 1. Define API Gateway Functions

[0156] Traffic entry: API gateway serves as the unified entrance of the system and handles requests from the outside.

[0157] Business logic processing: The API gateway is responsible for business logic, such as authentication, authorization, routing, etc.

[0158] 2. Introducing the sidecar proxy

[0159] Sidecar proxy deployment: Deploy one or more sidecar proxies alongside the API Gateway instance, which handle service mesh-related tasks.

[0160] Separation of responsibilities: The sidecar proxy handles infrastructure functions such as network communication, security, and monitoring, while the API gateway focuses on business logic.

[0161] 3. Service Registration and Discovery

[0162] Register with the service mesh: The API Gateway and Sidecar Proxy register with the service mesh’s control plane when they start up.

[0163] Service Discovery: The sidecar proxy discovers other service instances through the service mesh’s control plane.

[0164] 4. Traffic proxy and routing

[0165] Request interception: The sidecar proxy intercepts all requests entering the API gateway.

[0166] Routing decisions: The sidecar proxy routes requests to the correct service instance based on the configuration of the service mesh control plane.

[0167] By adopting the sidecar mode for the API gateway, the business logic of the API gateway can be effectively separated from the infrastructure functions, improving the flexibility and maintainability of the system. At the same time, the sidecar proxy can provide more fine-grained traffic control and security policies, enhancing the observability and reliability of the system.

[0168] Furthermore, the gateway component of the service grid adopts the sidecar mode to implement and maintain the traffic of the front-end WEB transaction requests routed to the microservices of the business system.

[0169] Furthermore, the gateway component of the service grid adopts a sidecar mode to implement and maintain the traffic of the first service request.

[0170] It should be noted that the interaction between different microservices within a subsystem does not need to go through the API gateway, but can communicate directly through the service mesh sidecar proxy.

[0171] The service mesh sidecar agent is responsible for implementing and maintaining the governance of this part of the traffic, including but not limited to traffic control, monitoring, security, etc.

[0172] The service mesh sidecar proxy can also implement fine-grained traffic control such as retries, timeouts, and circuit breakers based on the configuration of the service mesh control plane.

[0173] Furthermore, the API gateway is also used to implement and maintain the traffic of the second service request.

[0174] Furthermore, the domain gateway is also used to implement and maintain the traffic of the second service request.

[0175] The present application embodiment also provides another gateway traffic processing device based on service grid communication, such as Figure 3 For the sake of convenience, only the parts related to the embodiments of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiments of the present application. The terminal can be any terminal device including a mobile phone, a tablet computer, a personal digital assistant (English full name: Personal Digital Assistant, English abbreviation: PDA), a sales terminal (English full name: Point of Sales, English abbreviation: POS), a car computer, etc., taking the terminal as a mobile phone as an example:

[0176] Figure 3 FIG. 1 is a block diagram showing a partial structure of a mobile phone related to a terminal provided in an embodiment of the present application. Figure 3 The mobile phone includes: a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, a processor 1080, and a power supply 1090. Those skilled in the art can understand that Figure 3 The mobile phone structure shown in the figure does not constitute a limitation on the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0177] Combine the following Figure 3 A detailed introduction to the various components of the mobile phone:

[0178] The RF circuit 1010 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 1080 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 1010 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (full name: Low Noise Amplifier, English abbreviation: LNA), a duplexer, etc. In addition, the RF circuit 1010 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communications can use any communication standard or protocol, including but not limited to Global System of Mobile communications (Global System of Mobile communication, English abbreviation: GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, English abbreviation: CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (Long Term Evolution, English abbreviation: LTE), e-mail, Short Messaging Service (SMS), etc.

[0179] The memory 1020 can be used to store software programs and modules. The processor 1080 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1020. The memory 1020 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 1020 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0180] The input unit 1030 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 1031 or near the touch panel 1031 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 1031 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the processor 1080, and can receive and execute commands sent by the processor 1080. In addition, the touch panel 1031 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1031, the input unit 1030 may also include other input devices 1032. Specifically, the other input devices 1032 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.

[0181] The display unit 1040 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 1040 may include a display panel 1041. Optionally, the display panel 1041 may be configured in the form of a liquid crystal display (full name in English: Liquid Crystal Display, English abbreviation: LCD), an organic light-emitting diode (full name in English: Organic Light-Emitting Diode, English abbreviation: OLED), etc. Further, the touch panel 1031 may cover the display panel 1041. When the touch panel 1031 detects a touch operation on or near it, it is transmitted to the processor 1080 to determine the type of touch event. Subsequently, the processor 1080 provides a corresponding visual output on the display panel 1041 according to the type of touch event. Although in Figure 3 In the embodiment, the touch panel 1031 and the display panel 1041 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 1031 and the display panel 1041 can be integrated to realize the input and output functions of the mobile phone.

[0182] The mobile phone may also include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 1041 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.

[0183] The audio circuit 1060, the speaker 1061, and the microphone 1062 can provide an audio interface between the user and the mobile phone. The audio circuit 1060 can transmit the received audio data to the speaker 1061 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 1062 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1060 and converted into audio data, and then the audio data is output to the processor 1080 for processing, and then sent to another mobile phone through the RF circuit 1010, or the audio data is output to the memory 1020 for further processing.

[0184] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the WiFi module 1070. It provides users with wireless broadband Internet access. Figure 3 A WiFi module 1070 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.

[0185] The processor 1080 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 1020 and calling data stored in the memory 1020, it executes various functions of the mobile phone and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 1080 may include one or more processing units; preferably, the processor 1080 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1080.

[0186] The mobile phone also includes a power supply 1090 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 1080 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.

[0187] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.

[0188] In the embodiment of the present application, the processor 1080 included in the terminal also has the following functions:

[0189] Step S1, the API gateway obtains the front-end WEB transaction request, and proxies the traffic of the front-end WEB transaction request to the gateway component of the service grid;

[0190] Step S2: The gateway component of the service grid routes the front-end WEB transaction request to the microservice of the corresponding business system.

[0191] It should be noted that all front-end WEB transaction requests from the Internet and the intranet first pass through the API gateway.

[0192] After receiving the front-end WEB request, the API gateway does not directly access the microservice, but proxies the traffic to the gateway component of the service mesh.

[0193] The gateway component of the service mesh receives requests forwarded by the API gateway and routes the requests to the microservices of the corresponding business system according to the control plane instructions of the service mesh.

[0194] As a north-south gateway, the API gateway is responsible for connecting to the external network or inter-cluster traffic, managing business interfaces, and providing business-related functions such as permission authentication, session management, blacklists and whitelists. It pays attention to request and response parameter declarations and emphasizes business boundaries.

[0195] The gateway component of the service mesh serves as an east-west gateway, responsible for receiving traffic within the cluster. It does not focus on business boundaries, but focuses on microservice calls registered to the control plane, emphasizing infrastructure capabilities.

[0196] The gateway component of the service mesh performs service discovery based on service registration information and distributes requests to backend microservices through load balancing strategies.

[0197] It is understandable that each microservice instance registers itself with the control plane of the service mesh when it starts, providing information such as the service name and instance address.

[0198] The control plane of a service mesh maintains a service registry through which other services can discover and access other services.

[0199] In addition, authentication and authorization between services can be implemented at the service mesh level to ensure that only legitimate services can be accessed.

[0200] Furthermore, it also includes:

[0201] The microservice included in the business system is used to route the first service request directly to another microservice included in the business system.

[0202] It should be noted that the interaction between different microservices within a subsystem does not need to go through the API gateway, but can communicate directly through the service mesh sidecar proxy.

[0203] The service mesh sidecar agent is responsible for implementing and maintaining the governance of this part of the traffic, including but not limited to traffic control, monitoring, security, etc.

[0204] When a service needs to call another service, it first queries the control plane of the service mesh for instance information of the target service.

[0205] The service grid selects a service instance to call based on a load balancing strategy (such as polling, random, least connection, etc.).

[0206] The service mesh can route requests to different service instances based on the configured routing rules.

[0207] A service mesh can replicate a portion of traffic to another service instance for testing or monitoring purposes.

[0208] The service grid can record call logs between services to facilitate troubleshooting and monitoring.

[0209] The service mesh can monitor the calls between services, including indicators such as response time and error rate.

[0210] The service grid can encrypt the communication between services to ensure the security of data transmission. It also provides end-to-end encryption to ensure the security of data during transmission.

[0211] When a problem occurs with a service instance, the service mesh can automatically cut off calls to that instance to prevent the fault from spreading.

[0212] The service mesh can automatically retry failed requests to improve the system's fault tolerance.

[0213] The control plane of the service mesh can dynamically adjust routing rules, load balancing strategies, etc. without restarting the service.

[0214] The service mesh can control the new version of the service to gradually replace the old version, reducing the risk of release.

[0215] The service mesh can control the proportion of traffic received by different versions of services as needed.

[0216] Furthermore, it also includes:

[0217] The API gateway is also used to perform routing access for second service requests between microservices respectively included in two or more business systems.

[0218] It should be noted that the backend microservice interactions between subsystems need to go through the API gateway, which implements and maintains traffic management.

[0219] Furthermore, it also includes:

[0220] Domain gateway: The domain gateway is set in the API gateway;

[0221] The domain gateway is used to perform routing access for second service requests between microservices respectively included in two or more business systems.

[0222] It should be noted that the backend microservice interactions between subsystems need to go through the domain gateway, which implements and maintains traffic governance.

[0223] Based on the actual situation and needs of the subsystem, decide whether to build a domain gateway to handle specific north-south traffic.

[0224] Furthermore, the API gateway adopts the sidecar mode to implement and maintain the traffic of front-end WEB transaction requests.

[0225] It should be noted that the sidecar pattern is a pattern that decouples applications from infrastructure support functions in the service mesh architecture. In this pattern, one or more sidecar agents run next to each microservice instance, which take on tasks related to the service mesh, while the microservices themselves focus on business logic.

[0226] The sidecar pattern of the API gateway is an innovative architectural design that aims to decouple the traffic processing and business logic of the API gateway and improve the flexibility and maintainability of the system. Specifically:

[0227] 1. Define API Gateway Functions

[0228] Traffic entry: API gateway serves as the unified entrance of the system and handles requests from the outside.

[0229] Business logic processing: The API gateway is responsible for business logic, such as authentication, authorization, routing, etc.

[0230] 2. Introducing the sidecar proxy

[0231] Sidecar proxy deployment: Deploy one or more sidecar proxies alongside the API Gateway instance, which handle service mesh-related tasks.

[0232] Separation of responsibilities: The sidecar proxy handles infrastructure functions such as network communication, security, and monitoring, while the API gateway focuses on business logic.

[0233] 3. Service Registration and Discovery

[0234] Register with the service mesh: The API Gateway and Sidecar Proxy register with the service mesh’s control plane when they start up.

[0235] Service Discovery: The sidecar proxy discovers other service instances through the service mesh’s control plane.

[0236] 4. Traffic proxy and routing

[0237] Request interception: The sidecar proxy intercepts all requests entering the API gateway.

[0238] Routing decisions: The sidecar proxy routes requests to the correct service instance based on the configuration of the service mesh control plane.

[0239] By adopting the sidecar mode for the API gateway, the business logic of the API gateway can be effectively separated from the infrastructure functions, improving the flexibility and maintainability of the system. At the same time, the sidecar proxy can provide more fine-grained traffic control and security policies, enhancing the observability and reliability of the system.

[0240] Furthermore, the gateway component of the service grid adopts the sidecar mode to implement and maintain the traffic of the front-end WEB transaction requests routed to the microservices of the business system.

[0241] Furthermore, the gateway component of the service grid adopts a sidecar mode to implement and maintain the traffic of the first service request.

[0242] It should be noted that the interaction between different microservices within a subsystem does not need to go through the API gateway, but can communicate directly through the service mesh sidecar proxy.

[0243] The service mesh sidecar agent is responsible for implementing and maintaining the governance of this part of the traffic, including but not limited to traffic control, monitoring, security, etc.

[0244] The service mesh sidecar proxy can also implement fine-grained traffic control such as retries, timeouts, and circuit breakers based on the configuration of the service mesh control plane.

[0245] Furthermore, the API gateway is also used to implement and maintain the traffic of the second service request.

[0246] Furthermore, the domain gateway is also used to implement and maintain the traffic of the second service request.

[0247] An embodiment of the present application also provides a computer-readable storage medium for storing program code, which is used to execute any implementation of a gateway traffic processing method based on service grid communication described in the aforementioned embodiments.

[0248] In an embodiment of the present application, a system and gateway traffic processing method based on service grid communication is provided, by clarifying the traffic processed by the API gateway and the gateway component of the service grid respectively, wherein the API gateway is used to proxy the traffic of the front-end WEB transaction request to the gateway component of the service grid, and then the gateway component of the service grid routes the front-end WEB transaction request to the microservice of the corresponding business system, thereby standardizing the traffic trend and governance implementation scenario, and realizing the separation of technical logic and business logic through the service grid, solving the invasive pain points of the technical framework for business development, and at the same time clarifying the precise placement of overlapping capabilities, solving the technical problem that after the gateway application is on the container, because the container cloud base has its own traffic gateway, and the service grid also has a gateway component, it is difficult to distinguish and implement and maintain the overlapping functions of request routing, current limiting and fuse breaking, and protocol conversion.

[0249] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0250] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0251] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0252] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0253] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0254] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0255] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (full name in English: Read-Only Memory, English abbreviation: ROM), random access memory (full name in English: Random Access Memory, English abbreviation: RAM), disk or optical disk and other media that can store program codes.

[0256] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A system based on service grid communication, characterized in that: include: API gateway, gateway components of the service grid, and several business systems, each of which includes one or more microservices; The API gateway is used to obtain the front-end WEB transaction request and proxy the traffic of the front-end WEB transaction request to the gateway component of the service grid; The gateway component of the service grid is used to route the front-end WEB transaction request to the corresponding microservice of the business system.

2. The system based on service grid communication according to claim 1, characterized in that: The microservice included in the business system is used to route the first service request directly to another microservice included in the business system.

3. The system based on service grid communication according to claim 1, characterized in that: Also includes: The API gateway is also used to perform routing access for second service requests between the microservices respectively included in two or more of the business systems.

4. The system based on service grid communication according to claim 1, characterized in that: Also includes: A domain gateway, wherein the domain gateway is arranged in the API gateway; The domain gateway is used to perform routing access of the second service request between the microservices respectively included in two or more of the business systems.

5. The system based on service grid communication according to claim 1, characterized in that: The API gateway adopts the sidecar mode to implement and maintain the traffic of the front-end WEB transaction request.

6. The system based on service grid communication according to claim 1, characterized in that: The gateway component of the service grid adopts the sidecar mode to implement and maintain the traffic of the front-end WEB transaction request routed to the microservice of the business system.

7. The system based on service grid communication according to claim 2, characterized in that: The gateway component of the service grid adopts a sidecar mode to implement and maintain the traffic of the first service request.

8. The system based on service grid communication according to claim 3, characterized in that: The API gateway is also used to implement and maintain the traffic of the second service request.

9. The system based on service grid communication according to claim 4, characterized in that: The domain gateway is also used to implement and maintain the traffic of the second service request.

10. A gateway traffic processing method based on service grid communication, characterized in that: The system based on service grid communication according to any one of claims 1 to 9, wherein the method comprises: Step S1, the API gateway obtains the front-end WEB transaction request, and proxies the traffic of the front-end WEB transaction request to the gateway component of the service grid; Step S2: The gateway component of the service grid routes the front-end WEB transaction request to the microservice of the corresponding business system.