Service grid configuration update method, device, computing equipment and medium
By obtaining the operating status data of the service grid agent, determining the call relationship between services in the service grid, and automatically updating the configuration information, the problem of low efficiency in the configuration optimization of service grid in the existing technology is solved, and automated optimization and resource consumption are achieved.
Patent Information
- Application Number
- CN202210247811.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-14
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2042-03-14
AI Technical Summary
The prior art is less efficient when optimizing service grid configuration and requires manual service screening.
By obtaining the running status data of the service mesh agent, the call relationship between services in the service mesh is determined, and the configuration information of the service mesh agent is automatically updated based on this relationship.
Improve the efficiency of service mesh configuration optimization, reduce resource consumption of each mesh agent in the data plane, and avoid manual operations.
Smart Images

Figure CN114661325B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of this specification relate to the field of cloud computing technology, and in particular, to a method, apparatus, computing device, and medium for updating a service grid configuration. Background Art
[0002] A service mesh refers to a configurable infrastructure layer for managing microservice applications, which can provide functions such as service discovery, load balancing, encryption, authentication, authorization, support for circuit breaker mode, and a series of other functions. In order to ensure the functionality of the service mesh, a service mesh proxy is usually configured, and the control plane sends configuration data to each service mesh proxy so that the service mesh can correctly proxy service traffic, thereby achieving service interoperability and service governance. Furthermore, after the service mesh proxy configuration is completed, the service mesh configuration can also be optimized. Service mesh configuration optimization refers to reducing the amount of configuration data sent by the control plane to the service mesh proxy and reducing unnecessary pushes, so as to improve the push efficiency of the service mesh control plane and reduce the resource consumption of each mesh proxy on the data plane.
[0003] In related technologies, when optimizing a service grid configuration, relevant technical personnel mainly screen out services that are not related to each service instance from multiple services based on prior knowledge of the services in the grid, and then remove the service information of these services from the service grid configuration to achieve the purpose of optimizing the service grid configuration.
[0004] In the above implementation process, relevant technical personnel are required to manually screen services, resulting in low efficiency in service grid configuration optimization. Summary of the Invention
[0005] In view of this, one or more embodiments of this specification provide a service grid configuration update method, apparatus, computing device, and medium.
[0006] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:
[0007] According to a first aspect of one or more embodiments of this specification, a service grid configuration update method is proposed, the method comprising:
[0008] Obtaining running status data of at least one service in the service grid corresponding to the service grid proxy, where the running status data corresponds to at least one dimension;
[0009] Determining a call relationship between at least one service in the service grid based on the operating status data corresponding to the at least one dimension;
[0010] For a first service in the service grid, based on a calling relationship between the first service and other services, configuration information corresponding to the first service in the service grid proxy is updated.
[0011] In some embodiments, obtaining the operational status data of at least one service in the service grid corresponding to the service grid proxy includes at least one of the following:
[0012] Get requests from the service mesh proxy and generate log data based on the requests as operational status data;
[0013] Receive requests from the service mesh proxy and generate monitoring data based on the requests and preset monitoring indicators as operational status data;
[0014] Obtain a request from a service mesh proxy, and generate tracing data based on the transmission path of the request in the service mesh corresponding to the service mesh proxy as operation status data.
[0015] In some embodiments, determining a call relationship between at least one service in a service grid based on the operational status data corresponding to at least one dimension includes at least one of the following:
[0016] Based on the log data, identify the service with the same request name and service namespace in the log data as the service with the call relationship;
[0017] Based on the monitoring data, determine the similarity of the monitoring data between any two services, and determine the services that meet the set conditions as having a call relationship;
[0018] Based on the tracking data, any two adjacent services in the transmission path indicated by the tracking data are determined as services having a calling relationship.
[0019] In some embodiments, the method further comprises at least one of the following:
[0020] Based on the log data, services with the same request name, service namespace, and transmission port in the log data are identified as services with a call relationship;
[0021] Based on the log data, services with the same request name, service namespace, and transmission protocol in the log data are determined to be services with a call relationship.
[0022] In some embodiments, the method further comprises:
[0023] In a case where the running status data used to determine the call relationship corresponds to at least two dimensions, a weighted calculation is performed on the determined call relationship to obtain a call relationship between at least one service corresponding to the service grid agent.
[0024] In some embodiments, based on a call relationship between the first service and other services, updating configuration information corresponding to the first service in the service grid proxy includes:
[0025] Determining a second service that is unrelated to the first service based on a call relationship between the first service and other services;
[0026] Delete the configuration information corresponding to the second service from the configuration information of the first service recorded by the service grid agent.
[0027] In some embodiments, the method further comprises any of the following:
[0028] Obtaining real-time operational status data to update configuration information in the service mesh proxy based on the operational status data;
[0029] Obtaining operational status data at set intervals to update the configuration information in the service grid proxy based on the operational status data;
[0030] When the proxy configuration update instruction is received, the operation status data is obtained to update the configuration information in the service grid proxy based on the operation status data.
[0031] According to a second aspect of one or more embodiments of this specification, a service grid configuration update device is provided, the device including:
[0032] an acquisition module, configured to acquire running status data of at least one service in a service grid corresponding to a service grid proxy, where the running status data corresponds to at least one dimension;
[0033] a determination module, configured to determine a call relationship between at least one service in the service grid based on the operation status data corresponding to at least one dimension;
[0034] The update module is used to update the configuration information corresponding to the first service in the service grid agent based on the calling relationship between the first service and other services.
[0035] In some embodiments, the acquisition module, when used to obtain the running status data of at least one service in the service grid corresponding to the service grid agent, is used to do at least one of the following:
[0036] Get requests from the service mesh proxy and generate log data based on the requests as operational status data;
[0037] Receive requests from the service mesh proxy and generate monitoring data based on the requests and preset monitoring indicators as operational status data;
[0038] Obtain a request from a service mesh proxy, and generate tracing data based on the transmission path of the request in the service mesh corresponding to the service mesh proxy as operation status data.
[0039] In some embodiments, the determining module, when used to determine a call relationship between at least one service in a service grid based on the operating status data corresponding to at least one dimension, is used to perform at least one of the following:
[0040] Based on the log data, identify the service with the same request name and service namespace in the log data as the service with the call relationship;
[0041] Based on the monitoring data, determine the similarity of the monitoring data between any two services, and determine the services that meet the set conditions as having a call relationship;
[0042] Based on the tracking data, any two adjacent services in the transmission path indicated by the tracking data are determined as services having a calling relationship.
[0043] In some embodiments, the determination module is further configured to:
[0044] Based on the log data, services with the same request name, service namespace, and transmission port in the log data are identified as services with a call relationship;
[0045] Based on the log data, services with the same request name, service namespace, and transmission protocol in the log data are determined to be services with a call relationship.
[0046] In some embodiments, the determination module is further used to perform weighted calculation on the determined call relationship when the running status data used to determine the call relationship corresponds to at least two dimensions, so as to obtain the call relationship between at least one service corresponding to the service grid agent.
[0047] In some embodiments, the update module, when used to update the configuration information corresponding to the first service in the service grid proxy based on the calling relationship between the first service and other services, is used to:
[0048] Determining a second service that is unrelated to the first service based on a call relationship between the first service and other services;
[0049] Delete the configuration information corresponding to the second service from the configuration information of the first service recorded by the service grid agent.
[0050] In some embodiments, the acquisition module is configured to:
[0051] Obtaining real-time operational status data to update configuration information in the service mesh proxy based on the operational status data;
[0052] Obtaining operational status data at set intervals to update the configuration information in the service grid proxy based on the operational status data;
[0053] When the proxy configuration update instruction is received, the operation status data is obtained to update the configuration information in the service grid proxy based on the operation status data.
[0054] According to a third aspect of one or more embodiments of this specification, a computing device is provided, the computing device including:
[0055] processor;
[0056] a memory for storing processor-executable instructions;
[0057] The processor implements the operations performed by the service grid configuration update method provided in the first aspect and any embodiment of the first aspect by running executable instructions.
[0058] According to a fourth aspect of one or more embodiments of this specification, a computer-readable storage medium is proposed, on which computer instructions are stored. When the instructions are executed by a processor, the operations performed by the service grid configuration update method provided in the above-mentioned first aspect and any embodiment of the first aspect are implemented.
[0059] According to a fifth aspect of one or more embodiments of this specification, a computer program product is proposed, comprising a computer program, which, when executed by a processor, implements the operations performed by the service grid configuration update method provided in the first aspect and any embodiment of the first aspect.
[0060] For at least one service in the service grid corresponding to the service grid agent, the present application obtains the operating status data of at least one service corresponding to at least one dimension, and thereby determines the calling relationship between at least one service in the service grid based on the operating status data corresponding to at least one dimension, and then automatically updates the configuration information corresponding to at least one service in the service grid agent based on the calling relationship between each service and other services, so as to optimize the configuration information in the service grid agent without the need for manual operation by relevant technical personnel, thereby improving the efficiency of service grid configuration optimization and reducing the resource consumption of each grid agent in the data plane. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 This is a schematic diagram of a service grid provided by an exemplary embodiment.
[0062] Figure 2 This is a flowchart of a service grid configuration update method provided by an exemplary embodiment.
[0063] Figure 3 This is an architectural diagram of a service grid configuration update method provided by an exemplary embodiment.
[0064] Figure 4 It is a block diagram of a service grid configuration update device provided by an exemplary embodiment.
[0065] Figure 5 It is a schematic structural diagram of a computing device provided by an exemplary embodiment. DETAILED DESCRIPTION
[0066] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments are not intended to represent all implementations consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of one or more embodiments of this specification, as detailed in the appended claims.
[0067] It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than those described in this specification. In addition, a single step described in this specification may be broken down into multiple steps for description in other embodiments, and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0068] Cloud computing, one of the fastest-growing trends in computer technology, involves providing hosted services over the Internet. Specifically, cloud computing is a service delivery model that enables convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines, and services) that can be quickly provisioned and released with minimal management effort or interaction with the service provider.
[0069] In order to provide cloud computing services to external users, a cloud computing resource pool (referred to as a cloud platform, generally referred to as an Infrastructure as a Service (IaaS) platform) can be established, and various types of virtual resources can be deployed in the resource pool for external customers to choose and use.
[0070] Based on logical functional divisions, the Platform as a Service (PaaS) layer can be deployed on top of the IaaS layer, and the Software as a Service (SaaS) layer can be deployed on top of the PaaS layer. SaaS can also be deployed directly on top of IaaS. PaaS is a platform for software execution, such as databases and web containers. SaaS is a variety of business software, such as World Wide Web (Web) portals and text message senders. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.
[0071] Among them, IaaS can provide users with processing services, storage services, network services and other basic computing resources. Consumers can deploy and run any software in these resources, including operating systems and applications. Through IaaS, users do not manage or control the underlying cloud infrastructure, but can control the operating system, storage, deployed applications, and may have limited control over selected network components (such as host firewalls).
[0072] SaaS provides users with provider applications running on cloud infrastructure for their use. These applications can be accessed from a variety of client devices through a thin client interface such as a web browser (e.g., web-based email). SaaS allows users to not manage or control the underlying cloud infrastructure, including the network, servers, operating systems, storage, or even individual application functions, with the possible exception of limited user-specific application configuration settings.
[0073] PaaS can provide users with the ability to deploy consumer-created or acquired applications onto cloud infrastructure. These applications are created using programming languages and tools supported by the provider. Through PaaS, users do not manage or control the underlying cloud infrastructure, including networks, servers, operating systems, or storage, but can control deployed applications and possible application hosting environment configurations.
[0074] Optionally, cloud computing can be deployed in various forms such as private cloud, community cloud, public cloud, hybrid cloud, etc. In the private cloud model, the cloud infrastructure runs only for the organization; the cloud infrastructure of the community cloud is shared by multiple organizations and supports a specific community with common concerns (for example, missions, security requirements, policies, and compliance considerations); the cloud infrastructure of the public cloud is available to the public or large industry groups and is owned by the organization that sells cloud services; the cloud infrastructure of the hybrid cloud is a combination of two or more clouds (private, community, or public), which are still unique entities but are bound together by standardized or proprietary technologies that support data and application portability (for example, cloud bursting for load balancing between clouds).
[0075] Cloud computing environments deliver computing and storage resources as services to end users. End users can issue requests to the provisioned services for processing. The processing capacity of the services is often limited by the configured resources. Despite all the automatic scaling capabilities provided by cloud computing environments, workload bottlenecks still need to be addressed.
[0076] Specifically, services can be supplied or deployed based on various virtualization technologies supported by the cloud computing environment. In some embodiments, services can be supplied based on virtual machines (VMs), container-based virtualization, and the like. According to virtual machines-based virtualization, a virtual machine can be started to simulate a real computer that can execute programs and applications without directly contacting any actual hardware resources. While VMs virtualize machines, according to container-based virtualization, containers can be started to virtualize the entire operating system (OS) so that multiple workloads can run on a single OS instance. VM-based virtualization can include, for example, vSphere; container-based virtualization can include, for example, Kubernetes, Cloud Foundry, and the like.
[0077] In addition to service-based computing environments, there is another type of computing environment called serverless computing environments or platforms, of which Function as a Service (FaaS) is an example.
[0078] A serverless computing environment is a cloud computing model that enables the use of short-running, typically stateless functions that can be triggered by events. However, serverless computing does not mean that computer servers are not used in the computing environment. On the contrary, serverless computing means that users of a serverless computing environment do not need to provision or manage the physical computer servers, virtual machines, containers, etc. that the platform uses to execute user instructions.
[0079] In a serverless computing environment, resource allocation is managed by the cloud service provider, allowing you to develop functions without having to worry about implementing, tuning, or scaling servers. Serverless computing environments offer a way to achieve serverless goals, allowing developers to execute code in response to events without having to build or maintain complex infrastructure. Instead of scaling a monolithic hardware device to handle the potential load, services can be split into a set of functions that can scale automatically and independently.
[0080] The solution provided in this application involves cloud computing technology, which is specifically described through the following embodiments:
[0081] First, the technical terms involved in this application are introduced.
[0082] Service Mesh: A service mesh is a configurable infrastructure layer used to manage microservice applications. It is often used to describe the services that make up an application (such as microservices) and the interactions between them. A service mesh generally consists of a control plane and a data plane. The control plane is a set of services running in a dedicated namespace. These services are used to perform certain control and management functions, such as aggregating telemetry data, providing user-facing application programming interfaces (APIs), and providing control data to the data plane. The data plane, on the other hand, consists of a series of transparent proxies running next to each service instance.
[0083] Service mesh proxy: used to forward requests to be sent to the service mesh or issued by the service mesh. The requests corresponding to each microservice in the service mesh will pass through the service mesh proxy.
[0084] Service mesh proxy configuration: Service mesh proxy configuration refers to the configuration data issued by the control plane to each service mesh proxy in order to enable the service mesh to correctly proxy service traffic, achieve service interoperability and service governance.
[0085] Service mesh configuration optimization: This refers to reducing the amount of configuration data sent by the control plane to the service mesh proxy and reducing unnecessary pushes to improve the push efficiency of the service mesh control plane and reduce the resource consumption of each mesh proxy on the data plane.
[0086] Service dependency: In a distributed software system, the services provided by the system are based on the combination and collaboration between different sub-services. Service dependency is often used to describe the calling relationship between a service in the system and other services in order to complete the response to the request for the service.
[0087] See also Figure 1 , Figure 1This is a schematic diagram of a service grid provided by an exemplary embodiment. The service grid 100 is mainly used to facilitate secure and reliable communication between multiple microservices. Microservices refer to decomposing an application into multiple smaller services or instances and distributing them to run on different clusters / machines.
[0088] As shown in the figure, the microservices include application service instance A and application service instance B, which form the functional application layer of the service grid 100. In one embodiment, application service instances A and B run in the form of containers / processes on a machine / workload container group (Pod) 108.
[0089] In one implementation, application service instance A may be a product query service, and application service instance B may be a product ordering service.
[0090] like Figure 1 As shown, application service instance A and grid proxy (sidecar) 103 coexist in machine / workload container group 114, while application service instance B and grid proxy 105 coexist in machine / workload container group 115. Grid proxies 103 and 105 form the data plane layer (data plane) of service grid 100. Grid proxies 103 and 105 run as containers / processes 104 and 106, respectively. Bidirectional communication is possible between grid proxy 103 and application service instance A, and between grid proxy 105 and application service instance B. Furthermore, bidirectional communication is possible between grid proxy 103 and grid proxy 105.
[0091] In one embodiment, all traffic for application service instance A is routed to the appropriate destination via grid proxy 103, and all network traffic for application service instance B is routed to the appropriate destination via grid proxy 105. It should be noted that network traffic referred to herein includes, but is not limited to, Hypertext Transfer Protocol (HTTP), Representational State Transfer (REST), Remote Procedure Call (RPC, such as gRPC), and Remote Dictionary Server (Redis).
[0092] In one embodiment, the data plane layer's functionality can be extended by writing custom filters for the proxy (Envoy) in service mesh 100. Service mesh proxy configuration can be designed to enable the service mesh to correctly proxy service traffic, enabling service interoperability and service governance. Mesh proxy 103 and mesh proxy 105 can be configured to perform at least one of the following functions: service discovery, health checking, routing, load balancing, authentication and authorization, and observability.
[0093] like Figure 1 As shown, the service grid 100 also includes a control plane layer. The control plane layer can be a group of services running in a dedicated namespace, and these services are hosted by the hosting control plane component 101 in the machine / workload container group (Machine / Pod) 102. Figure 1 As shown, the managed control plane component 101 communicates bidirectionally with the grid agent 103 and the grid agent 105. The managed control plane component 101 is configured to perform certain control and management functions. For example, the managed control plane component 101 receives telemetry data transmitted by the grid agent 103 and the grid agent 105 and can further aggregate this telemetry data. In addition to these services, the managed control plane component 101 can also provide a user-oriented application programming interface (API) to facilitate manipulation of network behavior and provide configuration data to the grid agent 103 and the grid agent 105.
[0094] This application provides a service grid configuration update method for updating service configuration information stored in a service grid proxy corresponding to the aforementioned service grid, thereby optimizing the configuration information in the service grid proxy. This service grid configuration update method can be executed by a computing device, which can be a server, such as a single server, multiple servers, a server cluster, a cloud computing platform, etc. Alternatively, the computing device can be a terminal device, such as a desktop computer, a portable computer, a PDA, a tablet computer, etc. This application does not limit the type or number of computing devices. It should be noted that the operating system installed on the computing device can be the Linux operating system.
[0095] After introducing the technical terms related to this application, the service grid configuration update method provided by this application is introduced below.
[0096] See also Figure 2 , Figure 2 This is a flowchart of a method for updating a service grid configuration provided by an exemplary embodiment, the method comprising:
[0097] Step 201: Obtain running status data of at least one service in the service grid corresponding to the service grid agent, where the running status data corresponds to at least one dimension.
[0098] It should be noted that when a computing device provides a certain usage function (such as a payment function) to a user, it may need to call multiple services in the service grid to provide the user with the required usage function through the mutual collaboration of multiple services.
[0099] When multiple services in a service mesh collaborate to provide users with the functionality they need, all requests originally sent directly to services in the service mesh are intercepted by the service mesh proxy, which then forwards the requests to services in the service mesh for processing. Requests sent by individual services in the service mesh are also first forwarded to the service mesh proxy, which then forwards them to the corresponding services. Therefore, the service mesh proxy can obtain operational status data for every service in the service mesh.
[0100] Step 202: Determine a call relationship between at least one service in the service grid based on the operating status data corresponding to at least one dimension.
[0101] Among them, the calling relationship can also be called a service dependency relationship. For example, if service A can call service B, then there is a calling relationship between service A and service B, or it can be said that there is a service dependency relationship between service A and service B.
[0102] Step 203: For the first service in the service grid, based on the calling relationship between the first service and other services, update the configuration information corresponding to the first service in the service grid agent.
[0103] The first service may be any service in the service grid.
[0104] For at least one service in the service grid corresponding to the service grid agent, the present application obtains the operating status data of at least one service corresponding to at least one dimension, and thereby determines the calling relationship between at least one service in the service grid based on the operating status data corresponding to at least one dimension, and then automatically updates the configuration information corresponding to at least one service in the service grid agent based on the calling relationship between each service and other services, so as to optimize the configuration information in the service grid agent without the need for manual operation by relevant technical personnel, thereby improving the efficiency of service grid configuration optimization and reducing the resource consumption of each grid agent in the data plane.
[0105] After introducing the basic implementation process of the present application, the service grid configuration update method provided by the present application is further explained in combination with multiple optional embodiments of the present application.
[0106] In some embodiments, a data collector can be set up on the data plane of the service grid, so that the operating status data can be obtained non-invasively through the set data collector. Therefore, in step 201, when obtaining the operating status data of at least one service in the service grid corresponding to the service grid agent, it can be achieved as follows:
[0107] Obtain the running status data of at least one service in the service grid through a data collector in the data plane of the service grid.
[0108] By setting a data collector in the data plane of the service grid, the operating status data of at least one service in the service grid can be obtained non-invasively through the set data collector.
[0109] The operating status data may include at least one of log data, monitoring data and tracking data. Optionally, the operating status data may also include other types of data. This application does not limit the specific data type of the operating status data.
[0110] In the case where the running status data includes at least one of the three dimensions of log data, monitoring data, and tracing data, in step 201, obtaining the running status data of at least one service in the service grid corresponding to the service grid agent may include at least one of the following:
[0111] 1. Obtain requests from the service mesh proxy and generate log data based on the requests as operational status data.
[0112] Since all requests sent or received by at least one service in the service grid can be intercepted by the service grid proxy, log data can be generated based on the requests obtained by obtaining the requests from the service grid proxy, that is, the requests transmitted by the service grid proxy.
[0113] In a possible implementation, a service access log may be generated for each intercepted request, and the generated service access log is used as log data.
[0114] The log data may include a service name and a service namespace. Optionally, the log data may also include other types of information, such as a transmission port and a transmission protocol.
[0115] 2. Obtain the request from the service mesh proxy and generate monitoring data based on the request and preset monitoring indicators as the operation status data.
[0116] Optionally, a request from a service grid agent may be obtained, thereby generating monitoring data based on the obtained request.
[0117] In one possible implementation, multiple monitoring indicators may be pre-set, so that after a request is received from a service grid agent, data corresponding to the pre-set monitoring indicators is determined from the received request as monitoring data.
[0118] Among them, the monitoring indicators may include the request time, the data volume of the response data corresponding to the request, and the data status of the response data (taking the data status involved in the payment function as an example, the data status involved in the payment function may include unpaid, successful payment, failed payment, etc.). Optionally, the monitoring indicators may also include other types of indicators. This application does not limit the specific types of monitoring indicators.
[0119] 3. Obtain a request from the service mesh proxy and generate tracing data based on the transmission path of the obtained request in the service mesh corresponding to the service mesh proxy.
[0120] Optionally, a request from a service grid proxy may be obtained, thereby generating tracing data based on the obtained request.
[0121] In one possible implementation, tracing information may be extracted from the obtained request, thereby determining a transmission path of the obtained request in the service grid based on the extracted tracing information, and then using the determined transmission path as tracing data.
[0122] Optionally, a request identifier (Identity Document, ID) may be used as the tracking information. In addition, other types of data may also be used as the tracking information. This application does not limit the specific type of the tracking information.
[0123] It should be noted that the above content has introduced that the operation status data can be acquired through a data collector. Since the operation status data can include multiple types of data, the data collector can also be of multiple types.
[0124] Taking the example that the operating status data includes log data, monitoring data and tracking data, the data collector can include a log data collector, a monitoring data collector and a tracking data collector, so that log data can be collected through the log data collector, monitoring data can be collected through the monitoring data collector, and tracking data can be collected through the tracking data collector.
[0125] Optionally, the data plane of the service grid may also be provided with data storage, such as a log data storage, a monitoring data storage, and a tracing data storage, so that after obtaining the operating status data, the obtained operating status data can be stored in the data storage. For example, log data can be stored in the log data storage, monitoring data can be stored in the monitoring data storage, and tracing data can be stored in the tracing data storage.
[0126] After obtaining the operating status data, a call relationship can be generated based on the obtained operating status data. Since the operating status data may include at least one of log data, monitoring data, and tracing data, in step 202, when determining the call relationship between at least one service in the service grid based on the operating status data corresponding to at least one dimension, at least one of the following implementation methods may be included:
[0127] In a possible implementation, based on the log data, services with the same request name and service namespace in the log data are determined as services with a call relationship.
[0128] For example, take the example of log data including log data corresponding to two services. For example, the log data includes log data corresponding to service A and log data corresponding to service B. If the data corresponding to service A and the log data corresponding to service B both include the same request name (such as a payment request), and the service namespaces of service A and service B are the same, it can be determined that there is a calling relationship between service A and service B.
[0129] Optionally, the call relationship between services can be determined by combining other types of information in the log data. For example, if the log data also includes the transmission port and transmission protocol, when determining the call relationship between at least one service in the service grid based on the log data as the running status data, at least one of the following implementation methods can also be used:
[0130] Based on the log data, services with the same service name, service namespace, and transmission port in the log data are identified as services with a call relationship;
[0131] Based on the log data, services with the same service name, service namespace, and transmission protocol in the log data are determined to be services with a call relationship.
[0132] It should be noted that the above two methods can also be used in combination. That is, in more possible implementation methods, based on log data, services with the same service name, service namespace, transmission port and transmission protocol in the log data can be determined as services with a calling relationship.
[0133] By combining information such as the transmission port and the transmission protocol to determine the call relationship, information from more angles can be integrated to determine the call relationship, thereby improving the accuracy of the determined call relationship.
[0134] In another possible implementation, based on the monitoring data, the similarity of the monitoring data between any two services is determined, and services whose similarity meets a set condition are determined as services having a calling relationship.
[0135] Taking the monitoring indicators including request time, the size of the response data corresponding to the request, and the data status of the response data as an example, for any two services, the similarity of the monitoring data corresponding to any monitoring indicator can be determined, so that when the determined similarity meets the target conditions, it can be determined that there is a calling relationship between the two services.
[0136] In addition, for any two services, the similarity of the monitoring data corresponding to multiple monitoring indicators can be determined separately to obtain multiple similarities, and then based on these multiple similarities, the similarity of the two services can be determined. Then, when the determined similarity meets the target conditions, it can be determined that there is a call relationship between the two services. Optionally, when determining the similarity of the two services based on multiple similarities, the average of these multiple similarities can be calculated, and the calculated average value can be used as the similarity of the two services. In addition, other methods can be used to determine the similarity of the two services based on multiple similarities, and this application does not limit this.
[0137] The similarity satisfies the target condition, which may be that the similarity is greater than a preset threshold. The preset threshold may be any value, and the present application does not limit the specific value of the preset threshold.
[0138] In another possible implementation, based on the tracking data, any two adjacent services in the transmission path indicated by the tracking data are determined as services having a calling relationship.
[0139] It should be noted that based on the transmission path of a request in the service grid, the calling relationship between the various services in the service grid can be determined. Although the calling relationship determined based on a request is accurate, it may not be comprehensive. Therefore, the transmission paths of multiple requests in the service grid can be collected, so as to obtain a more comprehensive calling relationship based on the transmission paths of multiple requests in the service grid.
[0140] Through the above process, the calling relationship of each service in the service grid can be determined from three different dimensions. The above three methods can be used separately, that is, the calling relationship can be determined based on any of the above methods. In more possible implementation methods, the above three methods can also be used in combination, that is, any two or three of them can be used to determine the calling relationship.
[0141] In some embodiments, when the running status data used to determine the call relationship corresponds to at least two dimensions, a weighted calculation is performed on the determined call relationship to obtain the call relationship between at least one service corresponding to the service grid agent.
[0142] Among them, when performing weighted calculation on the determined call relationship, the weight of the call relationship determined based on different types of operating status data can be determined based on the sampling rate and sampling time of different types of operating status data. Optionally, the weight can also be determined in combination with other information.
[0143] Taking the sampling rate and sampling time of different types of operating status data as an example, determining the weight of the call relationship determined based on different types of operating status data, the product of the sampling rate and the sampling time can be calculated, and the calculated product can be proportional to achieve the determination of the weight.
[0144] For example, if two types of operating status data are used, and the products of the sampling rate and sampling time corresponding to these two types of operating status data are 9 and 7 respectively, then the two values can be proportionally calculated and the sum of the proportions can be guaranteed to be 1, so that the weights of the call relationships determined based on these two types of operating status data are 0.5625 and 0.4375 respectively.
[0145] Through the above method, the sampling rate and sampling time can be combined to realize the weight of the call relationship determined based on the operating status data of different dimensions. It can ensure that the longer the sampling time and the higher the sampling rate, the greater the weight of the call relationship determined by the data, and the longer the sampling time and the higher the sampling rate, the higher the accuracy of the data, so that the credibility of the call relationship obtained by weighted calculation is higher.
[0146] The above embodiments adopt two or three methods to realize the determination of the call relationship from different dimensions, and then perform weighted calculation on the multiple determined call relationships, so as to realize the integration of the call relationships determined based on the operating status data of different dimensions, thereby further enhancing the accuracy, comprehensiveness and completeness of the determined call relationships.
[0147] Optionally, a data analyzer, such as a log data analyzer, a monitoring data analyzer, and a tracing data analyzer, may also be provided in the data plane of the service grid, so that the call relationship can be determined based on the corresponding type of operating status data through the log data analyzer, the monitoring data analyzer, and the tracing data analyzer.
[0148] After determining the call relationship between at least one service in the service grid, the configuration information in the service grid proxy can be further refined based on the determined call relationship to achieve service grid configuration optimization. In some embodiments, in step 203, when updating the configuration information corresponding to the first service in the service grid proxy based on the call relationship between the first service and other services, the following steps can be included:
[0149] Step 2031: Based on the calling relationship between the first service and other services, determine a second service that is unrelated to the first service.
[0150] Taking a service grid including service A, service B, and service C as an example, if the calling relationship between service A, service B, and service C is determined through the above process as: service A calls service B, service B calls service C, and there is no direct calling relationship between service A and service C, then for service A, service C is a target service unrelated to service A.
[0151] Step 2032: Delete the configuration information corresponding to the second service from the configuration information of the first service recorded by the service grid agent.
[0152] It should be noted that the service grid agent can record the configuration information of each service included in the service grid. Taking the service grid including service A, service B and service C as an example, through the above step 2031, it can be determined that service C is a target service unrelated to service A. Then, the configuration information corresponding to service C can be deleted from the configuration information of service A recorded in the service grid agent, thereby optimizing the service grid configuration.
[0153] In some embodiments, an update rule generator and an agent configuration controller may be set in the control plane of the service grid, so that the above-mentioned step 1031 may be executed by the update rule generator, and configuration update rules may be generated based on the target service determined by step 1031. The configuration update rules may indicate the configuration information to be deleted, so that the agent configuration controller may generate updated configuration information based on the configuration update rules generated by the update rule generator, and then send the updated configuration information to the service grid agent in the data plane of the service grid, so that in the updated configuration information of the service grid agent, the configuration information corresponding to each service is related to those services that have a calling relationship with the service, so as to achieve optimization of the service grid configuration.
[0154] See also Figure 2 , Figure 3 This is an architectural diagram of a service grid configuration update method provided by an exemplary embodiment. Figure 3 What is shown is a service grid, which includes a data plane 301 and a control plane 302. A data collector 303 (including a log data collector 3031, a monitoring data collector 3032 and a tracing data collector 3033) can be set in the service grid data plane 301, so that the operation status data can be obtained through the data collector 303, for example, log data can be obtained through the log data collector 3031, monitoring data can be obtained through the monitoring data collector 3032, and tracing data can be obtained through the tracing data collector 3033.
[0155] After obtaining these multiple types of operating status data, the data analyzer 304 (including the log data analyzer 3041, the monitoring data analyzer 3042 and the tracking data analyzer 3043) can be used to determine the call relationship based on the operating status data. For example, the log data analyzer 3041 can be used to determine the call relationship based on the log data, the monitoring data analyzer 3042 can be used to determine the call relationship based on the monitoring data, and the tracking data analyzer 3043 can be used to determine the call relationship based on the tracking data, so as to obtain call relationships of different dimensions.
[0156] After obtaining the call relationships of different dimensions, the call relationships of different dimensions can be weighted calculated by the call relationship aggregator 305 set in the service grid control plane 302 to obtain the fused call relationships, so that the configuration update rule generator 306 set in the service grid control plane 302 can generate configuration update rules based on the fused call relationships, and then send the configuration update rules to the proxy configuration controller 307 set in the service grid control plane 302, so that the proxy configuration controller 307 generates an updated proxy configuration based on the configuration update rules, and then sends the updated configuration information to the service grid proxy 308 set in the service grid data plane 301, so that the application service 309 set in the service grid data plane 301 can provide services to users based on the configuration information in the service grid proxy 308.
[0157] Through the above-mentioned embodiments, the present application analyzes at least one of the log data, monitoring data and tracing data generated by the service grid agent, thereby automatically analyzing and extracting the call relationship between at least one service included in the service grid from the data generated by the service grid agent, and integrating the call relationship determined based on data of multiple dimensions to improve the accuracy and completeness of the determined call relationship without user participation, thereby overcoming the shortcomings of the service grid configuration update scheme in the related art that requires the user to understand the prior knowledge of service dependencies in advance.
[0158] At the same time, this application uses the configuration update rule generator to automatically generate configuration update rules for the service grid using the call relationship obtained through analysis, so that the data plane proxy configuration service will send the updated service grid proxy configuration to the service grid proxy to complete the grid configuration optimization without user participation, thereby overcoming the shortcomings of related technologies that relevant technical personnel need to understand the configuration update rules specific to the service grid platform, and greatly reducing the learning cost required for relevant technical personnel to update the grid configuration.
[0159] After the service grid configuration optimization is achieved through the above process, it can be ensured that the configuration information of each service recorded in the service grid agent is all services that have a calling relationship with each service. Therefore, when any subsequent service is updated, the configuration information of the updated service can be sent to the service that has a calling relationship with the service according to the configuration information recorded in the service grid agent, without being sent to services that are not related to the service. Taking the example of determining that service A and service C have no direct calling relationship, the above process can be used to delete the configuration information related to service C from the configuration information recorded by service A in the service grid agent. Then, when service C is updated, there is no need to push the new configuration information of service C to service A, thereby reducing unnecessary pushes and improving the push efficiency in the service grid.
[0160] It should be noted that the above is an introduction to the implementation of this application, and the timing of the service grid configuration update method provided in this application may include any of the following:
[0161] 1. Obtaining operational status data in real time to update the configuration information in the service grid proxy based on the operational status data.
[0162] 2. Obtaining operational status data at set intervals to update configuration information in the service grid proxy based on the operational status data. The set duration can be any duration, and this application does not limit the specific value of the set duration.
[0163] 3. Upon receiving a proxy configuration update instruction, obtain operational status data to update the configuration information in the service mesh proxy based on the operational status data. The proxy configuration update instruction may be manually triggered by a relevant technician. Alternatively, the proxy configuration update instruction may be triggered by other methods. This application does not limit the triggering timing of the proxy configuration update instruction.
[0164] Optionally, the operating status data may be acquired at other times, and the configuration information in the service grid proxy may be updated based on the acquired operating status data.
[0165] By providing multiple optional times for obtaining operation status data, relevant technical personnel can choose from them according to actual needs, thereby ensuring that operation status data is obtained and service grid proxy configuration is updated at the appropriate time.
[0166] Corresponding to the aforementioned method embodiments, this specification also provides embodiments of an apparatus and a computing device to which the apparatus is applied.
[0167] See also Figure 4 , Figure 4 1 is a block diagram of a service grid configuration update device provided by an exemplary embodiment, the device comprising:
[0168] An acquisition module 401 is configured to acquire operating status data of at least one service in a service grid corresponding to a service grid proxy, where the operating status data corresponds to at least one dimension.
[0169] A determination module 402 is configured to determine a call relationship between at least one service in the service grid based on the operation status data corresponding to at least one dimension;
[0170] The updating module 403 is configured to update the configuration information corresponding to the first service in the service grid agent based on the calling relationship between the first service and other services.
[0171] In some embodiments, when obtaining the running status data of at least one service in the service grid corresponding to the service grid proxy, the acquisition module 401 is configured to perform at least one of the following:
[0172] Get requests from the service mesh proxy and generate log data based on the requests as operational status data;
[0173] Receive requests from the service mesh proxy and generate monitoring data based on the requests and preset monitoring indicators as operational status data;
[0174] Obtain a request from a service mesh proxy, and generate tracing data based on the transmission path of the request in the service mesh corresponding to the service mesh proxy as operation status data.
[0175] In some embodiments, determining module 402, when used to determine a call relationship between at least one service in a service grid based on the operational status data corresponding to at least one dimension, is used to perform at least one of the following:
[0176] Based on the log data, identify the service with the same request name and service namespace in the log data as the service with the call relationship;
[0177] Based on the monitoring data, determine the similarity of the monitoring data between any two services, and determine the services that meet the set conditions as having a call relationship;
[0178] Based on the tracking data, any two adjacent services in the transmission path indicated by the tracking data are determined as services having a calling relationship.
[0179] In some embodiments, the determining module 402 is further configured to:
[0180] Based on the log data, services with the same request name, service namespace, and transmission port in the log data are identified as services with a call relationship;
[0181] Based on the log data, services with the same request name, service namespace, and transmission protocol in the log data are determined to be services with a call relationship.
[0182] In some embodiments, the determination module 402 is further used to perform weighted calculation on the determined call relationship when the running status data used to determine the call relationship corresponds to at least two dimensions, so as to obtain the call relationship between at least one service corresponding to the service grid agent.
[0183] In some embodiments, when updating the configuration information corresponding to the first service in the service grid proxy based on the calling relationship between the first service and other services, the updating module 403 is configured to:
[0184] Determining a second service that is unrelated to the first service based on a call relationship between the first service and other services;
[0185] Delete the configuration information corresponding to the second service from the configuration information of the first service recorded by the service grid agent.
[0186] In some embodiments, the acquisition module 401 is configured to:
[0187] Obtaining real-time operational status data to update configuration information in the service mesh proxy based on the operational status data;
[0188] Obtaining operational status data at set intervals to update the configuration information in the service grid proxy based on the operational status data;
[0189] When the proxy configuration update instruction is received, the operation status data is obtained to update the configuration information in the service grid proxy based on the operation status data.
[0190] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.
[0191] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0192] This application also provides a computing device, see Figure 5 , Figure 5 This is a schematic diagram of a computing device provided by an exemplary embodiment. Figure 5 At the hardware level, the device includes a processor 502, an internal bus 504, a network interface 506, a memory 508, and a non-volatile memory 510. Of course, it may also include hardware required to implement other functions. One or more embodiments of this specification can be implemented based on software, such as the processor 502 reading the corresponding computer program from the non-volatile memory 510 into the memory 508 and then running it. Of course, in addition to software implementation, one or more embodiments of this specification do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0193] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.
[0194] In a typical configuration, a computer includes one or more processors (Central Processing Unit, CPU), input / output interfaces, network interfaces and memory.
[0195] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0196] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change random access memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0197] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0198] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0199] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "an," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0200] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when..." or "when..." or "in response to determining."
[0201] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of this specification shall be included in the scope of protection of one or more embodiments of this specification.
Claims
1. A method for updating a service grid configuration, characterized in that: The method comprises: Obtaining running status data of at least one service in the service grid corresponding to the service grid agent, wherein the running status data corresponds to at least one dimension; Determining, based on the running status data corresponding to at least one dimension, a call relationship between at least one service in the service grid; For a first service in the service grid, based on a calling relationship between the first service and other services, updating configuration information corresponding to the first service in the service grid agent; Wherein, when determining a call relationship between at least one service in the service grid based on the at least one running status data corresponding to at least one dimension, the method further includes: When the running status data used to determine the calling relationship corresponds to at least two dimensions, a calling relationship is determined based on the running status data corresponding to each dimension, and the determined calling relationships are weightedly calculated to obtain the calling relationship between at least one service corresponding to the service grid agent.
2. The method according to claim 1, characterized in that Obtaining running status data of at least one service in the service grid corresponding to the service grid proxy, including at least one of the following: Obtaining a request from the service grid agent, and generating log data based on the request as the running status data; Obtaining a request from the service grid agent, and generating monitoring data based on the request and preset monitoring indicators as the operating status data; A request from the service grid agent is obtained, and tracking data is generated based on a transmission path of the request in the service grid corresponding to the service grid agent as the running status data.
3. The method according to claim 2, characterized in that Determining, based on the running status data corresponding to at least one dimension, a call relationship between at least one service in the service grid, including at least one of the following: Based on the log data, determining services with the same request name and service namespace in the log data as services having a call relationship; Based on the monitoring data, determining the similarity of the monitoring data between any two services, and determining the services whose similarity meets the set conditions as services having a calling relationship; Based on the tracking data, any two adjacent services in the transmission path indicated by the tracking data are determined as services having a calling relationship.
4. The method according to claim 3, characterized in that The method further comprises at least one of the following: Based on the log data, determining services with the same request name, service namespace, and transmission port in the log data as services having a call relationship; Based on the log data, services with the same request name, service namespace and transmission protocol in the log data are determined as services having a calling relationship.
5. The method according to claim 1, characterized in that Based on the calling relationship between the first service and other services, updating the configuration information corresponding to the first service in the service grid proxy includes: Determine a second service that is unrelated to the first service based on a calling relationship between the first service and other services; Delete configuration information corresponding to the second service from the configuration information of the first service recorded by the service grid agent.
6. The method according to claim 1, characterized in that The method further comprises any of the following: Acquire the running status data in real time to update the configuration information in the service grid proxy based on the running status data; Acquire the running status data at set intervals to update configuration information in the service grid proxy based on the running status data; When the proxy configuration update instruction is received, the running status data is obtained to update the configuration information in the service grid proxy based on the running status data.
7. A service grid configuration update device, characterized in that: The device comprises: An acquisition module, configured to acquire running status data of at least one service in a service grid corresponding to a service grid agent, wherein the running status data corresponds to at least one dimension; a determination module, configured to determine a call relationship between at least one service in the service grid based on the running status data corresponding to at least one dimension; An updating module, configured to update, for a first service in the service grid, configuration information corresponding to the first service in the service grid agent based on a calling relationship between the first service and other services; Among them, the determination module is also used to determine a call relationship based on the running status data corresponding to each dimension when the running status data used to determine the call relationship corresponds to at least two dimensions, and perform weighted calculation on the determined call relationships to obtain the call relationship between at least one service corresponding to the service grid agent.
8. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor implements the service grid configuration updating method as described in any one of claims 1 to 6 by running the executable instructions.
9. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instructions are executed by the processor, the service grid configuration updating method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Information management system and method
CN110784527A