WO2022042007A1 - 一种定位微服务熔断异常的方法、系统、设备及介质 - Google Patents

一种定位微服务熔断异常的方法、系统、设备及介质 Download PDF

Info

Publication number
WO2022042007A1
WO2022042007A1 PCT/CN2021/103291 CN2021103291W WO2022042007A1 WO 2022042007 A1 WO2022042007 A1 WO 2022042007A1 CN 2021103291 W CN2021103291 W CN 2021103291W WO 2022042007 A1 WO2022042007 A1 WO 2022042007A1
Authority
WO
WIPO (PCT)
Prior art keywords
component
data
circuit breaker
fuse
microservice
Prior art date
Application number
PCT/CN2021/103291
Other languages
English (en)
French (fr)
Inventor
蓝玉杰
刘正伟
Original Assignee
苏州浪潮智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 苏州浪潮智能科技有限公司 filed Critical 苏州浪潮智能科技有限公司
Priority to US18/011,928 priority Critical patent/US20230246919A1/en
Publication of WO2022042007A1 publication Critical patent/WO2022042007A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • H04L41/064Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis involving time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0677Localisation of faults
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5003Managing SLA; Interaction between SLA and QoS
    • H04L41/5019Ensuring fulfilment of SLA
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/508Network service management, e.g. ensuring proper service fulfilment according to agreements based on type of value added network service under agreement
    • H04L41/5096Network service management, e.g. ensuring proper service fulfilment according to agreements based on type of value added network service under agreement wherein the managed service relates to distributed or central networked applications

Definitions

  • the present invention relates to the field of cloud management platforms, and more particularly, to a method, a system, a computer device and a readable medium for locating a microservice fuse abnormality.
  • a microservice application is often multi-level, and each level has its own independent load balancing.
  • a node under a component triggers a fuse
  • the user needs to find the abnormal node from the load balancing pool of a component.
  • locating the abnormal information when the circuit breaker is triggered from the massive data of this node is a time-consuming and labor-intensive task, which is very difficult for maintaining microservice applications.
  • the purpose of the embodiments of the present invention is to propose a method, system, computer device and computer-readable storage medium for locating microservice fuse abnormality.
  • one aspect of the embodiments of the present invention provides a method for locating a microservice fuse exception, including the following steps: creating a microservice application including multiple components, and judging whether there is a component configured in the microservice application circuit breaker protection strategy; in response to a component in the microservice application configured with a circuit breaker protection strategy, monitor the component configured with the circuit breaker protection strategy and collect data of all nodes under the component; in response to detecting the component There is a node in the fuse that triggers a fuse to filter out data in a preset time period; and matches a preset abnormal keyword according to the data in the preset time period, and associates the abnormal keyword with the node to locate the abnormality.
  • the filtering out the data of the preset time period includes: determining a fuse moment, and filtering out log information and operation monitoring data within a first time before and after the fuse moment.
  • the method further includes: acquiring a network condition at the moment of fusing according to the operation monitoring data, and adjusting the preset time period based on the network condition.
  • the method further includes: in response to multiple components being blown at the same time, judging whether the keywords corresponding to the multiple components are completely consistent.
  • the method further includes: in response to the keywords corresponding to the multiple components being completely identical, restarting the microservice application.
  • the determining whether a component in the microservice application is configured with a circuit breaker protection policy includes: determining whether a component in the microservice application is configured with a forwarding policy; and responding to the presence of a component in the microservice application The component configures a forwarding policy, and judges whether the forwarding policy is associated with the circuit breaker protection policy.
  • monitoring the component and collecting data of all nodes under the component includes: determining all nodes corresponding to the component according to the component information of the component, and collecting logs of all the nodes information and operational monitoring data.
  • a system for locating microservice fuse exceptions including: creating a module configured to create a microservice application including multiple components, and judging whether a component exists in the microservice application A circuit breaker protection strategy is configured; a collection module is configured to configure a circuit breaker protection strategy in response to a component in the microservice application, monitor the component configured with the circuit breaker protection strategy, and collect data of all nodes under the component a screening module, configured to filter out data of a preset time period in response to detecting that a node triggers a fuse in the component; and a positioning module, configured to match a preset abnormality according to the data of the preset time period keyword, and associate the abnormal keyword with the node to locate the abnormality.
  • a computer device comprising: at least one processor; and a memory, where the memory stores computer instructions that can be executed on the processor, and the instructions are executed by the processor.
  • the processor implements the steps of the above method when executed.
  • a computer-readable storage medium stores a computer program that implements the above method steps when executed by a processor.
  • the invention has the following beneficial technical effects: by monitoring and collecting the data of all nodes under the component, when the microservice application component triggers the fuse protection measure, the corresponding data information and network state are quickly determined, and the corresponding keywords are matched to quickly locate the abnormal cause , reduce manpower investment and improve operation and maintenance efficiency.
  • FIG. 1 is a schematic diagram of an embodiment of a method for locating a microservice fuse exception provided by the present invention
  • FIG. 2 is a schematic diagram of an embodiment of a system for locating microservice fuse exceptions provided by the present invention
  • FIG. 3 is a schematic diagram of the hardware structure of an embodiment of a computer device for locating microservice fuse exceptions provided by the present invention.
  • FIG. 4 is a schematic structural diagram of a computer-readable storage medium provided by an embodiment of the present invention.
  • FIG. 1 shows a schematic diagram of an embodiment of a method for locating a microservice fuse exception provided by the present invention.
  • the embodiment of the present invention includes the following steps:
  • Cloud management platform is a cloud computing platform based on kubernetes (K8S, which is Google's open source container cluster management system) service orchestration technology, which can provide management of cloud computing services.
  • K8S is used to manage containerization on multiple hosts in the cloud platform. Applications.
  • the data collection device will collect standard data of all nodes under the component; when the circuit breaker monitoring device detects a circuit breaker trigger, it will According to the set data filtering range, the standard data of the corresponding time interval will be intercepted; the abnormality analysis device will label the circuit breaker according to the intercepted data and the preset abnormal keyword, and then the notification device will filter the collection to the information Aggregate, push abnormal point information to users, and users can quickly locate problems based on this information, without having to go to the bottom layer to manually view data information.
  • the determining whether a component in the microservice application is configured with a circuit breaker protection policy includes: determining whether a component in the microservice application is configured with a forwarding policy; and responding to the presence of a component in the microservice application
  • the component configures a forwarding policy, and judges whether the forwarding policy is associated with the circuit breaker protection policy.
  • the user creates a microservice application on the cloud management platform.
  • the microservice application includes multiple components, and each component includes multiple nodes.
  • a DestinationRule (DR, forwarding policy) rule resource is created for the component at the bottom of kubernetes.
  • the DR will record the circuit breaker triggering rules. For example, when a node of a component experiences 10 consecutive errors, the errors include HTTP (Hyper Text Transfer Protocol) response errors of type 5xx, TCP (Transmission Control Protocol) connection timeout/failure and user-defined program exception feedback, etc.
  • HTTP Hyper Text Transfer Protocol
  • TCP Transmission Control Protocol
  • the component In response to a component in the microservice application configured with a circuit breaker protection policy, the component is monitored and data of all nodes under the component is collected.
  • the monitoring device detects that the fuse configuration is enabled in the DR, it will send a collection request to the data collection device. After the data collection device receives the collection request, it will find all the corresponding business nodes according to the component information, and collect the standard console of each node. data.
  • monitoring the component and collecting data of all nodes under the component includes: determining all nodes corresponding to the component according to the component information of the component, and collecting logs of all the nodes information and operational monitoring data.
  • the data of the preset time period is filtered out.
  • the monitoring device will send a data filtering request to the abnormality analysis device, and after receiving the data filtering request, the abnormality analysis device will filter out data for a preset time period.
  • the filtering out the data of the preset time period includes: determining a fuse moment, and filtering out log information and operation monitoring data within a first time before and after the fuse moment.
  • filter and filter out data information within a first time before and after the fuse time corresponding to the blown node, and the first time may be, for example, 10 seconds.
  • the preset abnormal keywords Matches the preset abnormal keywords according to the data of the preset time period, and associates the abnormal keywords with the nodes to locate the abnormality. After obtaining the data information of the preset time period, the abnormal information will be matched from the preset abnormal keywords, and the data information will be labeled with keywords. It is assumed that the preset keys are NullPointerException, IOException, SQLException, etc. If the logs in the time period contain abnormal information about these keywords, then this log will be tagged with the corresponding label, and the corresponding jump link will be made, so that the user can click the keyword to jump to the corresponding log paragraph .
  • the method further includes: acquiring a network condition at the moment of fusing according to the operation monitoring data, and adjusting the preset time period based on the network condition.
  • the abnormality analysis device also obtains the monitoring data of the operation of the fuse node, and obtains the network status when the fuse is triggered, such as HTTP response time, response status code, delay, throughput, and so on.
  • the length of the preset time period can also be adjusted according to network conditions.
  • the method further includes: in response to multiple components being blown at the same time, judging whether the keywords corresponding to the multiple components are completely consistent. In some embodiments, the method further includes: in response to the keywords corresponding to the multiple components being completely identical, restarting the microservice application. If multiple components are blown at the same time, and the blown exception is the same, there may be a problem with the architecture of the microservice application, and the microservice application can be restarted.
  • a system 200 for locating microservice blown exceptions including: a creation module 201 configured to create a microservice including multiple components application, and determine whether there is a component in the microservice application configured with a fuse protection policy; the collection module 202 is configured to respond to a component in the microservice application that is configured with a fuse protection policy, and configure the fuse protection policy for all components configured with the fuse protection policy.
  • the component monitors and collects the data of all nodes under the component; the screening module 203 is configured to filter out the data of a preset time period in response to detecting that there is a node triggering fuse in the component; and the positioning module 204 is configured It is used for matching a preset abnormal keyword according to the data of the preset time period, and associating the abnormal keyword with the node to locate the abnormality.
  • the screening module 203 is configured to: determine the fuse moment, and filter out log information and operation monitoring data within a first time before and after the fuse moment.
  • the system further includes: a second collection module, configured to acquire network conditions at the moment of fusing according to the operation monitoring data, and adjust the preset time period based on the network conditions.
  • a second collection module configured to acquire network conditions at the moment of fusing according to the operation monitoring data, and adjust the preset time period based on the network conditions.
  • system further includes: a judging module, configured to judge whether the keywords corresponding to the multiple components are completely consistent in response to the simultaneous fuse of multiple components.
  • system further includes: a restart module configured to restart the microservice application in response to the complete consistency of the keywords corresponding to the multiple components.
  • the creation module 201 is configured to: determine whether there is a component in the microservice application configured with a forwarding policy; and in response to a component in the microservice application configured with a forwarding policy, determine whether the forwarding policy is configured Whether the policy is associated with the circuit breaker protection policy.
  • the collecting module 202 is configured to: determine all nodes corresponding to the component according to the component information of the component, and collect log information and operation monitoring data of all the nodes.
  • a computer device including: at least one processor; and a memory, where the memory stores computer instructions that can be executed on the processor, and the instructions are executed by the processor to The following steps are implemented: S1. Create a microservice application including multiple components, and determine whether there is a component in the microservice application configured with a circuit breaker protection strategy; The component of the fuse protection strategy monitors and collects the data of all nodes under the component; S3, in response to detecting that there is a node in the component to trigger fuse, filter out the data of the preset time period; and S4, match the preset time period according to the data of the preset time period. Set the abnormal keyword, and associate the abnormal keyword with the node to locate the abnormal.
  • the filtering out the data of the preset time period includes: determining a fuse moment, and filtering out log information and operation monitoring data within a first time before and after the fuse moment.
  • the step further includes: acquiring a network condition at the moment of fusing according to the operation monitoring data, and adjusting the preset time period based on the network condition.
  • the step further includes: in response to multiple components being blown at the same time, judging whether the keywords corresponding to the multiple components are completely consistent.
  • the step further includes: in response to the exact same keywords corresponding to the multiple components, restarting the microservice application.
  • the determining whether a component in the microservice application is configured with a circuit breaker protection policy includes: determining whether a component in the microservice application is configured with a forwarding policy; and responding to the presence of a component in the microservice application The component configures a forwarding policy, and judges whether the forwarding policy is associated with the circuit breaker protection policy.
  • monitoring the component and collecting data of all nodes under the component includes: determining all nodes corresponding to the component according to the component information of the component, and collecting logs of all the nodes information and operational monitoring data.
  • FIG. 3 it is a schematic diagram of the hardware structure of an embodiment of the above-mentioned computer device for locating the abnormal fuse of the microservice provided by the present invention.
  • the device includes a processor 301 and a memory 302 , and may also include an input device 303 and an output device 304 .
  • the processor 301 , the memory 302 , the input device 303 and the output device 304 may be connected by a bus or in other ways, and the connection by a bus is taken as an example in FIG. 3 .
  • the memory 302 can be used to store non-volatile software programs, non-volatile computer-executable programs and modules, such as the method for locating a microservice fuse exception in the embodiment of the present application Corresponding program instruction/module.
  • the processor 301 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 302, that is, the method for locating the microservice blown exception in the above method embodiments is implemented.
  • the memory 302 may include a storage program area and a storage data area, wherein the storage program area may store an operating system and an application program required by at least one function; the storage data area may store data created according to the use of the method for locating the microservice fuse exception Wait. Additionally, memory 302 may include high speed random access memory, and may also include nonvolatile memory, such as at least one magnetic disk storage device, flash memory device, or other nonvolatile solid state storage device. In some embodiments, memory 302 may optionally include memory located remotely from processor 301, which may be connected to local modules via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the input device 303 can receive input information such as user name and password.
  • the output device 304 may include a display device such as a display screen.
  • the program instructions/modules corresponding to one or more methods for locating microservice blown exceptions are stored in the memory 302, and when executed by the processor 301, the method for locating microservice blown exceptions in any of the above method embodiments is executed.
  • Any embodiment of the computer device that executes the above method for locating a microservice fuse exception can achieve the same or similar effects as any of the foregoing method embodiments corresponding to it.
  • the present invention also provides a computer-readable storage medium 401, where the computer-readable storage medium 401 stores a computer program 410 for executing the above method when executed by a processor, as shown in FIG. 4 .
  • the storage medium can be a read-only memory, a magnetic disk or an optical disk, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本发明公开了一种定位微服务熔断异常的方法、系统、设备和存储介质,方法包括:创建包括多个组件的微服务应用,并判断微服务应用中是否存在组件配置了熔断保护策略;响应于微服务应用中存在组件配置了熔断保护策略,对配置了熔断保护策略的组件进行监听并收集组件下所有节点的数据;响应于检测到组件中存在节点触发熔断,筛选出预设时间段的数据;以及根据预设时间段的数据匹配预设的异常关键词,并将异常关键词与节点进行关联以定位异常。本发明在微服务应用组件触发熔断保护措施时,获取相应的数据信息和网络状态,快速定位异常原因,减少人力投入并提高运维效率。

Description

一种定位微服务熔断异常的方法、系统、设备及介质
本申请要求于2020年08月28日提交中国国家知识产权局,申请号为202010885427.X,发明名称为“一种定位微服务熔断异常的方法、系统、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及云管理平台领域,更具体地,特别是指一种定位微服务熔断异常的方法、系统、计算机设备及可读介质。
背景技术
在云计算时代中,传统应用业务实现微服务化上云后,随着业务平台的不断迭代更新,微服务应用系统中的服务组件越来越多,为了节省维护成本,会引入istio(一种大型微服务系统管理工具,提供一种统一化的微服务连接、安全保障、管理与监控方式)这种非侵入式的微服务治理方案,用来实现微服务组件之间的熔断保护措施,保护应用整体的可用性。
一个微服务应用,往往是多层级的,而且每个层级之间都会有各自独立的负载均衡,当组件下的某节点触发熔断时,用户要从一个组件的负载均衡池中找到这个异常节点,并且从这个节点的海量数据中定位到触发熔断时的异常信息,这是一件费时费力的事情,这对于维护微服务应用是一件很困难的事情。
发明内容
有鉴于此,本发明实施例的目的在于提出一种定位微服务熔断异常的方法、系统、计算机设备及计算机可读存储介质,通过监听并收集组件下所有节点的数据,当微服务应用组件触发熔断保护措施时,快速确定相应的数据信息和网络状态,匹配对应的关键词从而快速定位异常原因,减少人力投入并提高运维效率。
基于上述目的,本发明实施例的一方面提供了一种定位微服务熔断异常的方法,包括如下步骤:创建包括多个组件的微服务应用,并判断所述微服务应用中是否存在组件配置了熔断保护策略;响应于所述微服务应用中存在组件配置了熔断保护策略,对配置了熔断保护策略的所述组件进行监听并收集所述组件下所有节点的数据;响应于检测到所述组件中存在节点触发熔断,筛选出预设时间段的数据;以及根据所述预设时间段的数据匹配预设的异常关键词,并将所述异常关键词与所述节点进行关联以定位异常。
在一些实施方式中,所述筛选出预设时间段的数据包括:确定熔断时刻,并筛选出所述熔断时刻前后第一时间内的日志信息和运行监控数据。
在一些实施方式中,方法还包括:根据所述运行监控数据获取熔断时刻的网络状况,并基于所述网络状况调整所述预设时间段。
在一些实施方式中,方法还包括:响应于存在多个组件同时熔断,判断所述多个组件对应的关键词是否完全一致。
在一些实施方式中,方法还包括:响应于所述多个组件对应的关键词完全一致,对所述微服务应用进行重启。
在一些实施方式中,所述判断所述微服务应用中是否存在组件配置了熔断保护策略包括:判断所述微服务应用中是否存在组件配置了转发策略;以及响应于所述微服务应用中存在组件配置了转发策略,判断所述转发策 略是否与所述熔断保护策略相关联。
在一些实施方式中,所述对所述组件进行监听并收集所述组件下所有节点的数据包括:根据所述组件的组件信息确定所述组件对应的所有节点,并收集所述所有节点的日志信息和运行监控数据。
本发明实施例的另一方面,还提供了一种定位微服务熔断异常系统,包括:创建模块,配置用于创建包括多个组件的微服务应用,并判断所述微服务应用中是否存在组件配置了熔断保护策略;收集模块,配置用于响应于所述微服务应用中存在组件配置了熔断保护策略,对配置了熔断保护策略的所述组件进行监听并收集所述组件下所有节点的数据;筛选模块,配置用于响应于检测到所述组件中存在节点触发熔断,筛选出预设时间段的数据;以及定位模块,配置用于根据所述预设时间段的数据匹配预设的异常关键词,并将所述异常关键词与所述节点进行关联以定位异常。
本发明实施例的又一方面,还提供了一种计算机设备,包括:至少一个处理器;以及存储器,所述存储器存储有可在所述处理器上运行的计算机指令,所述指令由所述处理器执行时实现如上方法的步骤。
本发明实施例的再一方面,还提供了一种计算机可读存储介质,计算机可读存储介质存储有被处理器执行时实现如上方法步骤的计算机程序。
本发明具有以下有益技术效果:通过监听并收集组件下所有节点的数据,当微服务应用组件触发熔断保护措施时,快速确定相应的数据信息和网络状态,匹配对应的关键词从而快速定位异常原因,减少人力投入并提高运维效率。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地, 下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。
图1为本发明提供的定位微服务熔断异常的方法的实施例的示意图;
图2为本发明提供的定位微服务熔断异常系统的实施例的示意图;
图3为本发明提供的定位微服务熔断异常的计算机设备的实施例的硬件结构示意图;以及
图4为本发明的实施例提供的计算机可读存储介质的结构示意图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本发明实施例进一步详细说明。
需要说明的是,本发明实施例中所有使用“第一”和“第二”的表述均是为了区分两个相同名称非相同的实体或者非相同的参量,可见“第一”“第二”仅为了表述的方便,不应理解为对本发明实施例的限定,后续实施例对此不再一一说明。
基于上述目的,本发明实施例的第一个方面,提出了一种定位微服务熔断异常的方法的实施例。图1示出的是本发明提供的定位微服务熔断异常的方法的实施例的示意图。如图1所示,本发明实施例包括如下步骤:
S1、创建包括多个组件的微服务应用,并判断微服务应用中是否存在组件配置了熔断保护策略;
S2、响应于微服务应用中存在组件配置了熔断保护策略,对配置了熔断保护策略的组件进行监听并收集组件下所有节点的数据;
S3、响应于检测到组件中存在节点触发熔断,筛选出预设时间段的数 据;以及
S4、根据预设时间段的数据匹配预设的异常关键词,并将异常关键词与节点进行关联以定位异常。
云管理平台是一种基于kubernetes(K8S,是谷歌开源的容器集群管理系统)服务编排技术的云计算平台,可以提供云计算服务的管理,K8S用于管理云平台中多个主机上的容器化的应用。本发明实施例通过监听的方式,当用户给微服务应用组件配置了熔断保护策略的时候,数据收集装置会收集该组件下所有节点的标准数据;当熔断监听装置检测到熔断触发时,根据预设的数据过滤范围,截取对应时间区间的标准数据;异常分析装置则会根据截取的数据,根据预设的异常关键字,给此次熔断打上对应的标签,然后通知装置则把采集过滤到信息汇总,向用户推送异常点信息,用户则可以根据这些信息,快速定位问题,而不需要再去底层手动查看数据信息。
创建包括多个组件的微服务应用,并判断微服务应用中是否存在组件配置了熔断保护策略。
在一些实施方式中,所述判断所述微服务应用中是否存在组件配置了熔断保护策略包括:判断所述微服务应用中是否存在组件配置了转发策略;以及响应于所述微服务应用中存在组件配置了转发策略,判断所述转发策略是否与所述熔断保护策略相关联。用户在云管理平台创建一个微服务应用,微服务应用包括多个组件,每个组件又包括多个节点,在kubernetes底层为组件创建出一个DestinationRule(DR,转发策略)规则资源,当为某个组件配置了熔断策略之后,DR就会记录熔断触发规则,比如,当组件的某一节点连续10次出现错误,错误包括5xx类型的HTTP(Hyper Text Transfer Protocol,超文本传输协议)响应错误、TCP(Transmission Control Protocol,传输控制协议)的连接超时/失败和用户自定义的程序异常反馈等。
响应于微服务应用中存在组件配置了熔断保护策略,对组件进行监听并收集组件下所有节点的数据。监听装置监听到DR启用了熔断配置,就会向数据收集装置发出收集请求,数据收集装置收到收集请求后会根据组件信息,找到其对应的所有业务节点,并收集每个节点的标准控制台数据。
在一些实施方式中,所述对所述组件进行监听并收集所述组件下所有节点的数据包括:根据所述组件的组件信息确定所述组件对应的所有节点,并收集所述所有节点的日志信息和运行监控数据。
响应于检测到组件中存在节点触发熔断,筛选出预设时间段的数据。当微服务应用组件发生异常,触发熔断时,监听装置会向异常分析装置发出数据过滤请求,异常分析装置接收到数据过滤请求后会筛选出预设时间段的数据。
在一些实施方式中,所述筛选出预设时间段的数据包括:确定熔断时刻,并筛选出所述熔断时刻前后第一时间内的日志信息和运行监控数据。根据熔断时刻和节点信息,过滤筛选出对应被熔断节点的熔断时刻前后第一时间内的数据信息,第一时间例如可以是10秒。
根据预设时间段的数据匹配预设的异常关键词,并将异常关键词与节点进行关联以定位异常。在获取了预设时间段的数据信息后,会从预设的异常关键字中匹配异常信息,并给这些数据信息打上关键字标签,假设预设的关键有NullPointerException、IOException、SQLException等,若预设时间段内的日志中包含有这些关键字的异常信息,那么这段日志就会被加上对应的标签,并做对应的跳转连接,以便用户可以点击关键字跳转到对应的日志段落。
在一些实施方式中,方法还包括:根据所述运行监控数据获取熔断时刻的网络状况,并基于所述网络状况调整所述预设时间段。异常分析装置还会获取熔断节点的运行的监控数据,从中获取触发熔断时的网络状况, 比如HTTP的响应时间、响应状态码、时延、吞吐量等等。还可以根据网络状况对预设时间段的长短进行调整。
在一些实施方式中,方法还包括:响应于存在多个组件同时熔断,判断所述多个组件对应的关键词是否完全一致。在一些实施方式中,方法还包括:响应于所述多个组件对应的关键词完全一致,对所述微服务应用进行重启。如果多个组件同时熔断,并且熔断的异常是相同的,则可能是微服务应用的架构出现了问题,可以对微服务应用进行重启。
需要特别指出的是,上述定位微服务熔断异常的方法的各个实施例中的各个步骤均可以相互交叉、替换、增加、删减,因此,这些合理的排列组合变换之于定位微服务熔断异常的方法也应当属于本发明的保护范围,并且不应将本发明的保护范围局限在实施例之上。
基于上述目的,本发明实施例的第二个方面,提出了一种定位微服务熔断异常的系统200,如图2所示,包括:创建模块201,配置用于创建包括多个组件的微服务应用,并判断所述微服务应用中是否存在组件配置了熔断保护策略;收集模块202,配置用于响应于所述微服务应用中存在组件配置了熔断保护策略,对配置了熔断保护策略的所述组件进行监听并收集所述组件下所有节点的数据;筛选模块203,配置用于响应于检测到所述组件中存在节点触发熔断,筛选出预设时间段的数据;以及定位模块204,配置用于根据所述预设时间段的数据匹配预设的异常关键词,并将所述异常关键词与所述节点进行关联以定位异常。
在一些实施方式中,所述筛选模块203配置用于:确定熔断时刻,并筛选出所述熔断时刻前后第一时间内的日志信息和运行监控数据。
在一些实施方式中,系统还包括:第二收集模块,配置用于根据所述运行监控数据获取熔断时刻的网络状况,并基于所述网络状况调整所述预设时间段。
在一些实施方式中,系统还包括:判断模块,配置用于响应于存在多个组件同时熔断,判断所述多个组件对应的关键词是否完全一致。
在一些实施方式中,系统还包括:重启模块,配置用于响应于所述多个组件对应的关键词完全一致,对所述微服务应用进行重启。
在一些实施方式中,所述创建模块201配置用于:判断所述微服务应用中是否存在组件配置了转发策略;以及响应于所述微服务应用中存在组件配置了转发策略,判断所述转发策略是否与所述熔断保护策略相关联。
在一些实施方式中,所述收集模块202配置用于:根据所述组件的组件信息确定所述组件对应的所有节点,并收集所述所有节点的日志信息和运行监控数据。
基于上述目的,本发明实施例的第三个方面,提出了一种计算机设备,包括:至少一个处理器;以及存储器,存储器存储有可在处理器上运行的计算机指令,指令由处理器执行以实现如下步骤:S1、创建包括多个组件的微服务应用,并判断微服务应用中是否存在组件配置了熔断保护策略;S2、响应于微服务应用中存在组件配置了熔断保护策略,对配置了熔断保护策略的组件进行监听并收集组件下所有节点的数据;S3、响应于检测到组件中存在节点触发熔断,筛选出预设时间段的数据;以及S4、根据预设时间段的数据匹配预设的异常关键词,并将异常关键词与节点进行关联以定位异常。
在一些实施方式中,所述筛选出预设时间段的数据包括:确定熔断时刻,并筛选出所述熔断时刻前后第一时间内的日志信息和运行监控数据。
在一些实施方式中,步骤还包括:根据所述运行监控数据获取熔断时刻的网络状况,并基于所述网络状况调整所述预设时间段。
在一些实施方式中,步骤还包括:响应于存在多个组件同时熔断,判 断所述多个组件对应的关键词是否完全一致。
在一些实施方式中,步骤还包括:响应于所述多个组件对应的关键词完全一致,对所述微服务应用进行重启。
在一些实施方式中,所述判断所述微服务应用中是否存在组件配置了熔断保护策略包括:判断所述微服务应用中是否存在组件配置了转发策略;以及响应于所述微服务应用中存在组件配置了转发策略,判断所述转发策略是否与所述熔断保护策略相关联。
在一些实施方式中,所述对所述组件进行监听并收集所述组件下所有节点的数据包括:根据所述组件的组件信息确定所述组件对应的所有节点,并收集所述所有节点的日志信息和运行监控数据。
如图3所示,为本发明提供的上述定位微服务熔断异常的计算机设备的一个实施例的硬件结构示意图。
以如图3所示的装置为例,在该装置中包括一个处理器301以及一个存储器302,并还可以包括:输入装置303和输出装置304。
处理器301、存储器302、输入装置303和输出装置304可以通过总线或者其他方式连接,图3中以通过总线连接为例。
存储器302作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的定位微服务熔断异常的方法对应的程序指令/模块。处理器301通过运行存储在存储器302中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现上述方法实施例的定位微服务熔断异常的方法。
存储器302可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据 定位微服务熔断异常的方法的使用所创建的数据等。此外,存储器302可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器302可选包括相对于处理器301远程设置的存储器,这些远程存储器可以通过网络连接至本地模块。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
输入装置303可接收输入的用户名和密码等信息。输出装置304可包括显示屏等显示设备。
一个或者多个定位微服务熔断异常的方法对应的程序指令/模块存储在存储器302中,当被处理器301执行时,执行上述任意方法实施例中的定位微服务熔断异常的方法。
执行上述定位微服务熔断异常的方法的计算机设备的任何一个实施例,可以达到与之对应的前述任意方法实施例相同或者相类似的效果。
本发明还提供了一种计算机可读存储介质401,计算机可读存储介质401存储有被处理器执行时执行如上方法的计算机程序410,如图4所示。
最后需要说明的是,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关硬件来完成,定位微服务熔断异常的方法的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,程序的存储介质可为磁碟、光盘、只读存储记忆体(ROM)或随机存储记忆体(RAM)等。上述计算机程序的实施例,可以达到与之对应的前述任意方法实施例相同或者相类似的效果。
以上是本发明公开的示例性实施例,但是应当注意,在不背离权利要求限定的本发明实施例公开的范围的前提下,可以进行多种改变和修改。 根据这里描述的公开实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本发明实施例公开的元素可以以个体形式描述或要求,但除非明确限制为单数,也可以理解为多个。
应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。
上述本发明实施例公开实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本发明实施例公开的范围(包括权利要求)被限于这些例子;在本发明实施例的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上的本发明实施例的不同方面的许多其它变化,为了简明它们没有在细节中提供。因此,凡在本发明实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本发明实施例的保护范围之内。

Claims (10)

  1. 一种定位微服务熔断异常的方法,其特征在于,包括以下步骤:
    创建包括多个组件的微服务应用,并判断所述微服务应用中是否存在组件配置了熔断保护策略;
    响应于所述微服务应用中存在组件配置了熔断保护策略,对配置了熔断保护策略的所述组件进行监听并收集所述组件下所有节点的数据;
    响应于检测到所述组件中存在节点触发熔断,筛选出预设时间段的数据;以及
    根据所述预设时间段的数据匹配预设的异常关键词,并将所述异常关键词与所述节点进行关联以定位异常。
  2. 根据权利要求1所述的方法,其特征在于,所述筛选出预设时间段的数据包括:
    确定熔断时刻,并筛选出所述熔断时刻前后第一时间内的日志信息和运行监控数据。
  3. 根据权利要求2所述的方法,其特征在于,还包括:
    根据所述运行监控数据获取熔断时刻的网络状况,并基于所述网络状况调整所述预设时间段。
  4. 根据权利要求1所述的方法,其特征在于,还包括:
    响应于存在多个组件同时熔断,判断所述多个组件对应的关键词是否完全一致。
  5. 根据权利要求4所述的方法,其特征在于,还包括:
    响应于所述多个组件对应的关键词完全一致,对所述微服务应用进行重启。
  6. 根据权利要求1所述的方法,其特征在于,所述判断所述微服务应用中是否存在组件配置了熔断保护策略包括:
    判断所述微服务应用中是否存在组件配置了转发策略;以及
    响应于所述微服务应用中存在组件配置了转发策略,判断所述转发策略是否与所述熔断保护策略相关联。
  7. 根据权利要求1所述的方法,其特征在于,所述对所述组件进行监听并收集所述组件下所有节点的数据包括:
    根据所述组件的组件信息确定所述组件对应的所有节点,并收集所述所有节点的日志信息和运行监控数据。
  8. 一种定位微服务熔断异常的系统,其特征在于,包括:
    创建模块,配置用于创建包括多个组件的微服务应用,并判断所述微服务应用中是否存在组件配置了熔断保护策略;
    收集模块,配置用于响应于所述微服务应用中存在组件配置了熔断保护策略,对配置了熔断保护策略的所述组件进行监听并收集所述组件下所有节点的数据;
    筛选模块,配置用于响应于检测到所述组件中存在节点触发熔断,筛选出预设时间段的数据;以及
    定位模块,配置用于根据所述预设时间段的数据匹配预设的异常关键词,并将所述异常关键词与所述节点进行关联以定位异常。
  9. 一种计算机设备,其特征在于,包括:
    至少一个处理器;以及
    存储器,所述存储器存储有可在所述处理器上运行的计算机指令,所述指令由所述处理器执行时实现权利要求1-7任意一项所述方法的步骤。
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程 序,其特征在于,所述计算机程序被处理器执行时实现权利要求1-7任意一项所述方法的步骤。
PCT/CN2021/103291 2020-08-28 2021-06-29 一种定位微服务熔断异常的方法、系统、设备及介质 WO2022042007A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/011,928 US20230246919A1 (en) 2020-08-28 2021-06-29 Method and System for Locating Micro-Service Fusing Anomaly, Device and Medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010885427.XA CN112187511A (zh) 2020-08-28 2020-08-28 一种定位微服务熔断异常的方法、系统、设备及介质
CN202010885427.X 2020-08-28

Publications (1)

Publication Number Publication Date
WO2022042007A1 true WO2022042007A1 (zh) 2022-03-03

Family

ID=73925489

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/103291 WO2022042007A1 (zh) 2020-08-28 2021-06-29 一种定位微服务熔断异常的方法、系统、设备及介质

Country Status (3)

Country Link
US (1) US20230246919A1 (zh)
CN (1) CN112187511A (zh)
WO (1) WO2022042007A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190178A (zh) * 2022-08-10 2022-10-14 苏州创意云网络科技有限公司 一种微服务分流方法、装置和设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112187511A (zh) * 2020-08-28 2021-01-05 苏州浪潮智能科技有限公司 一种定位微服务熔断异常的方法、系统、设备及介质
CN116980480B (zh) * 2023-09-25 2024-02-27 上海伊邦医药信息科技股份有限公司 基于微服务网络模型的熔断信息的处理方法及系统
CN117370064B (zh) * 2023-10-31 2024-05-28 河北东软软件有限公司 一种基于容器技术的微服务系统

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108011752A (zh) * 2017-11-21 2018-05-08 江苏天联信息科技发展有限公司 故障定位分析方法及装置、计算机可读存储介质
CN108240284A (zh) * 2016-12-26 2018-07-03 北京金风科创风电设备有限公司 基于风力发电机组系统功能的数据处理方法和装置
CN108600005A (zh) * 2018-04-23 2018-09-28 国云科技股份有限公司 一种防御微服务雪崩效应的方法
CN108712309A (zh) * 2018-06-11 2018-10-26 郑州云海信息技术有限公司 一种微服务架构下的微服务节点防护方法和系统
WO2018200064A1 (en) * 2017-04-25 2018-11-01 Nec Laboratories America, Inc Identifying multiple causal anomalies in power plant systems by modeling local propagations
CN110351131A (zh) * 2019-06-28 2019-10-18 北京奇才天下科技有限公司 一种用于分布式链路的监控方法、装置和电子设备
CN112187511A (zh) * 2020-08-28 2021-01-05 苏州浪潮智能科技有限公司 一种定位微服务熔断异常的方法、系统、设备及介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11049030B2 (en) * 2016-03-07 2021-06-29 Nippon Telegraph And Telephone Corporation Analysis apparatus, analysis method, and analysis program
US11086974B2 (en) * 2017-09-25 2021-08-10 Splunk Inc. Customizing a user behavior analytics deployment
CN107992398B (zh) * 2017-12-22 2021-04-27 宜人恒业科技发展(北京)有限公司 一种业务系统的监控方法和监控系统
CN110908855A (zh) * 2018-09-18 2020-03-24 深圳市鸿合创新信息技术有限责任公司 一种微服务运行维护装置及方法、电子设备
US11385940B2 (en) * 2018-10-26 2022-07-12 EMC IP Holding Company LLC Multi-cloud framework for microservice-based applications
CN110888783B (zh) * 2019-11-21 2023-07-07 望海康信(北京)科技股份公司 微服务系统的监测方法、装置以及电子设备
CN111130939B (zh) * 2019-12-26 2021-09-10 深圳前海环融联易信息科技服务有限公司 一种流量控制方法、装置、计算机设备及存储介质
US11561802B2 (en) * 2020-05-19 2023-01-24 Amdocs Development Limited System, method, and computer program for a microservice lifecycle operator

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108240284A (zh) * 2016-12-26 2018-07-03 北京金风科创风电设备有限公司 基于风力发电机组系统功能的数据处理方法和装置
WO2018200064A1 (en) * 2017-04-25 2018-11-01 Nec Laboratories America, Inc Identifying multiple causal anomalies in power plant systems by modeling local propagations
CN108011752A (zh) * 2017-11-21 2018-05-08 江苏天联信息科技发展有限公司 故障定位分析方法及装置、计算机可读存储介质
CN108600005A (zh) * 2018-04-23 2018-09-28 国云科技股份有限公司 一种防御微服务雪崩效应的方法
CN108712309A (zh) * 2018-06-11 2018-10-26 郑州云海信息技术有限公司 一种微服务架构下的微服务节点防护方法和系统
CN110351131A (zh) * 2019-06-28 2019-10-18 北京奇才天下科技有限公司 一种用于分布式链路的监控方法、装置和电子设备
CN112187511A (zh) * 2020-08-28 2021-01-05 苏州浪潮智能科技有限公司 一种定位微服务熔断异常的方法、系统、设备及介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190178A (zh) * 2022-08-10 2022-10-14 苏州创意云网络科技有限公司 一种微服务分流方法、装置和设备
CN115190178B (zh) * 2022-08-10 2024-03-08 苏州创意云网络科技有限公司 一种微服务分流方法、装置和设备

Also Published As

Publication number Publication date
US20230246919A1 (en) 2023-08-03
CN112187511A (zh) 2021-01-05

Similar Documents

Publication Publication Date Title
WO2022042007A1 (zh) 一种定位微服务熔断异常的方法、系统、设备及介质
US10469320B2 (en) Versioning system for network states in a software-defined network
US10984013B1 (en) Tokenized event collector
US10904267B2 (en) Non-intrusive threat detection in a computer network
US11706080B2 (en) Providing dynamic serviceability for software-defined data centers
TW200417221A (en) Methods and apparatus for dependency-based impact simulation and vulnerability analysis
US11635752B2 (en) Detection and correction of robotic process automation failures
US11997746B2 (en) Discovery and service mapping of serverless resources
US10534791B1 (en) Analysis of tokenized HTTP event collector
US20200293310A1 (en) Software development tool integration and monitoring
CN113835836B (zh) 动态发布容器服务的系统、方法、计算机设备及介质
JP2011197785A (ja) ログ収集システムおよびログ収集プログラム
US20240137278A1 (en) Cloud migration data analysis method using system process information, and system thereof
KR101846193B1 (ko) It 서비스 관리 방법 및 이를 실행하는 장치
US20220357940A1 (en) Proactive Notifications for Robotic Process Automation
US11805146B2 (en) System and method for detection promotion
Li et al. Going through the life cycle of faults in clouds: Guidelines on fault handling
WO2016091141A1 (zh) 信息采集方法及装置
Meng et al. A generic framework for application configuration discovery with pluggable knowledge
Tudosi et al. Design and implementation of a distributed firewall management system for improved security
US11652702B2 (en) Configuring a software as-a-service platform for remotely managing a cloud application
US11258860B2 (en) System and method for bot detection and classification
JP6926646B2 (ja) 事業者間一括サービス管理装置および事業者間一括サービス管理方法
EP4307636A1 (en) Rapid error detection through command validation
US11902081B1 (en) Managing collection agents via an agent controller

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21859849

Country of ref document: EP

Kind code of ref document: A1