WO2020147331A1 - 一种微服务监控方法及系统 - Google Patents

一种微服务监控方法及系统 Download PDF

Info

Publication number
WO2020147331A1
WO2020147331A1 PCT/CN2019/106781 CN2019106781W WO2020147331A1 WO 2020147331 A1 WO2020147331 A1 WO 2020147331A1 CN 2019106781 W CN2019106781 W CN 2019106781W WO 2020147331 A1 WO2020147331 A1 WO 2020147331A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
status
instance
indicated
service instance
Prior art date
Application number
PCT/CN2019/106781
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 CA3168289A priority Critical patent/CA3168289A1/en
Publication of WO2020147331A1 publication Critical patent/WO2020147331A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5072Grid computing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5015Service provider selection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/508Monitor

Definitions

  • the invention relates to the technical field of microservices, in particular to a method and system for monitoring microservices.
  • Microservices are a method of developing a single application as a set of small services. Each application runs in its own process and communicates with a lightweight mechanism (usually HTTP resource API). These services are built around business functions and can be deployed independently through a fully automated deployment mechanism. Microservices are essentially distributed applications, usually they all run on a cluster with service instances in the cluster.
  • New service instances and offline service instances must be configured, started or destroyed by monitoring programs, and cannot be automatically sensed;
  • the present invention aims to solve at least one of the technical problems existing in the prior art or related technologies. To this end, the present invention provides a microservice monitoring method and system.
  • the service registry registers the service instance of the microservice
  • the monitoring center sends a status acquisition request to the service gateway;
  • the service gateway receives the status acquisition request, and acquires the registration record of the service instance indicated by the status acquisition request from the service registration center;
  • the service gateway queries the service status of the indicated service instance according to the registration record, and sends the service status query result to the monitoring center;
  • the method further includes:
  • the service registry and the service instance use a heartbeat mechanism to maintain communication, and if the communication interruption time exceeds a preset time, the service registry deregisters the service instance.
  • the query by the service gateway of the service status of the indicated service instance according to the registration record includes:
  • the service status includes one or more of CPU usage rate, memory usage rate, disk read/write, network connection status, heapSize information, and heapUsedSize information.
  • the corresponding processing includes:
  • a microservice monitoring system in a second aspect, includes a service registration center, a monitoring center and a service gateway, wherein:
  • the service registration center is used to register service instances of microservices
  • the monitoring center is configured to send a status acquisition request to the service gateway;
  • the service gateway includes:
  • a preprocessor configured to receive the state acquisition request
  • the result processor is used to send the service status query result to the monitoring center;
  • the monitoring center is also used to receive the service status query result and perform corresponding processing.
  • service registration center is also used for:
  • the service processor is configured to obtain the network address of the indicated service instance from the registration record;
  • the service broadcast plug-in is used to send a service status query request to the indicated service instance according to the network address, and receive the service status query result returned by the indicated service instance.
  • the traditional way uses the timing mechanism to upload the service status.
  • the monitoring center can obtain the latest service status of the service instance in real time through the service gateway.
  • the timeliness is high, the monitoring timeliness is improved, and no monitoring program is required. There is a problem that resources are occupied by monitoring programs.
  • FIG. 1 is a flowchart of a microservice monitoring method provided in Embodiment 1 of the present invention
  • Fig. 2 is a block diagram of a microservice monitoring system provided by the second embodiment of the present invention.
  • Fig. 1 is a flow chart of a microservice monitoring method provided by Embodiment 1 of the present invention. As shown in Fig. 1, the method may include the steps:
  • the service registration center registers the service instance of the microservice.
  • the registration information includes information such as the microservice name, network address, port, and several service instances.
  • the service registration center After the service registration center completes the registration of the service instance of the microservice, it will generate and store the registration record of the service instance to facilitate subsequent retrieval and use of the registration information of the service instance at the service gateway.
  • the method further includes:
  • the service registry and the service instance use the heartbeat mechanism to maintain communication. If the communication interruption time exceeds the preset time, the service registry will cancel the service instance.
  • the microservice After the microservice is started, it sends a heartbeat to the service registry according to a preset cycle time (can be set to 30 seconds), if the service registry does not receive the heartbeat within the preset time (can be set to 90 seconds) The heartbeat of the service instance of the microservice will cancel the service instance.
  • a preset cycle time can be set to 30 seconds
  • the service registry does not receive the heartbeat within the preset time (can be set to 90 seconds)
  • the heartbeat of the service instance of the microservice will cancel the service instance.
  • the service instance of the microservice is registered through the service registry, which can improve the convenience of monitoring, that is, the expansion and contraction of the microservice without manual configuration. It can be obtained dynamically through the service registry.
  • the service instance of the microservice realizes the purpose of automatically sensing the service instance.
  • the monitoring center sends a status acquisition request to the service gateway.
  • the status acquisition request may be an http request, and the status acquisition request may include the network address of a specified service instance.
  • the specified service instance may be a single service instance or multiple service instances; in addition, when In the case that no service instance is specified, the service instance indicated by the status acquisition request is all service instances that have been registered in the service registry.
  • the service gateway is a distributed service gateway obtained by configuring SpringCloud+Zuul.
  • the service gateway adopts a distributed decentralized deployment architecture, which avoids the situation that the monitoring program is deployed to the service instance in the traditional way, and the monitoring program may be down, thereby avoiding single point problems , To meet high availability.
  • the service gateway receives the status acquisition request, and acquires the registration record of the service instance indicated by the status acquisition request from the service registry.
  • the process may include:
  • the preprocessor in the service gateway receives the status acquisition request, and preprocesses the status acquisition request. Further, before preprocessing the status acquisition request, the preprocessor may also include the step of verifying the status acquisition request;
  • the service processor in the query processor requests the service registry to obtain the registration record of the service instance indicated by the status acquisition request, and receives the registration record of the service instance indicated by the status acquisition request returned by the service registry .
  • the service gateway queries the service status of the indicated service instance according to the registration record, and sends the service status query result to the monitoring center.
  • the process may include:
  • the service broadcast plug-in in the query processor obtains the network address of the indicated service instance from the registration record, broadcasts the status acquisition request to the service instance indicated by the status acquisition request, and receives the service status query result returned by the indicated service instance ;
  • the service status includes one or more of CPU usage, memory usage, disk read/write, network connection status, heapSize information, and heapUsedSize information.
  • the monitoring center receives the service status query result and performs corresponding processing.
  • the monitoring center performs corresponding processing on the service status query results, which may include:
  • the service instance with abnormal service status will be alarmed.
  • the monitoring center can obtain the service status of the designated service instance or all service instances registered by the service registration center in real time through the "service broadcast function" in the service gateway, thereby achieving the purpose of obtaining the latest service status of the service instance in real time Compared with the traditional way of uploading service status using a timing mechanism, it can greatly improve the timeliness of monitoring.
  • FIG. 2 is a block diagram of a microservice monitoring system provided by the second embodiment of the present invention.
  • the system includes a service registration center 21, a monitoring center 22 and a service gateway 23, wherein:
  • the service registry 21 is used to register service instances of microservices
  • the service gateway 23 includes:
  • the pre-processor 231 is configured to receive a status acquisition request
  • the query processor 232 is configured to obtain the registration record of the service instance indicated by the status acquisition request from the service registration center, and query the service status of the indicated service instance according to the registration record;
  • service registration center 21 is also used to:
  • the service processor is used to obtain the network address of the indicated service instance from the registration record;
  • the service broadcast plug-in is used to send a service status query request to the indicated service instance according to the network address, and receive the service status query result returned by the indicated service instance.
  • the service status includes one or more of CPU usage, memory usage, disk read/write, network connection status, heapSize information, and heapUsedSize information.
  • monitoring center 22 is specifically used for:
  • the service instance with abnormal service status will be alarmed.
  • microservice monitoring system in the microservice monitoring system provided in the above embodiments, only the division of the above functional modules is used as an example. In actual applications, the above functions can be allocated by different functional modules as needed, that is, the system The internal structure is divided into different functional modules to complete all or part of the functions described above.
  • microservice monitoring system and the microservice monitoring method embodiment belong to the same concept, and its specific implementation process and beneficial effects are detailed in the microservice monitoring method embodiment, which will not be repeated here.

Abstract

本发明公开了一种微服务监控方法及系统,属于微服务技术领域,方法包括:服务注册中心对微服务的服务实例进行注册;监控中心发送状态获取请求至服务网关;服务网关接收状态获取请求,并从服务注册中心获取状态获取请求指示的服务实例的注册记录;服务网关根据注册记录,查询指示的服务实例的服务状态,并将服务状态查询结果发送至监控中心;监控中心接收服务状态查询结果并进行相应处理。本发明实施例能够提升微服务的监控便利性以及监控时效性,且不存在资源被监控程序占用的问题。

Description

一种微服务监控方法及系统 技术领域
本发明涉及微服务技术领域,特别涉及一种微服务监控方法及系统。
背景技术
微服务是一种将单个应用程序作为一套小型服务开发的方法,每种应用程序都在自己的进程中运行,并与轻量级机制(通常是HTTP资源API)进行通信。这些服务是围绕业务功能构建的,可以通过全自动部署机制独立部署。微服务本质上是分布式应用,通常它们都运行在一个集群之上,集群中带有服务实例。
由于微服务运行个体多、部署方式多样,问题点会出现在各处,对服务状态的监控就变得十分困难。现有技术在微服务监控系统中,对于新增的服务实例,通常需要同时对该服务实例进行部署监控程序,通过监控程序定时收集监控数据,上传监控中心,以此实现监控的目的。
然而,现有技术的微服务监控系统存在有以下几个缺陷:
1、配置复杂、服务监控无法自动化:新增服务实例、下线服务实例,都要通过配置、启动或者销毁监控程序,无法自动感知;
2、占用资源、时效性差:配置程序是一个单独的进程,占用一定机器资源,且采取定时上报机制,导致不能获取到微服务的最新服务状态,存在时间差。
发明内容
本发明旨在至少解决现有技术或相关技术中存在的技术问题之一,为此本发明提供一种微服务监控方法及系统。
本发明实施例提供的具体技术方案如下:
第一方面,提供了一种微服务监控方法,所述方法包括:
服务注册中心对微服务的服务实例进行注册;
监控中心发送状态获取请求至服务网关;
所述服务网关接收所述状态获取请求,并从所述服务注册中心获取所述状态获取请求指示的服务实例的注册记录;
所述服务网关根据所述注册记录,查询所述指示的服务实例的服务状态,并将服务状态查询结果发送至所述监控中心;
所述监控中心接收所述服务状态查询结果并进行相应处理。
进一步地,所述服务注册中心对微服务的服务实例进行注册步骤之后,所述方法还包括:
所述服务注册中心与所述服务实例使用心跳机制保持通信,若通信中断时间超过预设时间,则所述服务注册中心注销所述服务实例。
进一步地,所述服务网关根据所述注册记录,查询所述指示的服务实例的服务状态包括:
从所述注册记录中获取所述指示的服务实例的网络地址;
根据所述网络地址,向所述指示的服务实例发送服务状态的查询请求,并接收所述指示的服务实例返回的服务状态查询结果。
进一步地,所述服务状态包括CPU使用率、内存使用率、磁盘读写、网络连接状态、heapSize信息和heapUsedSize信息的一种或多种。
进一步地,所述相应处理包括:
对所述服务状态查询结果进行存储;和/或
将所述服务状态查询结果进行页面展示;和/或
根据所述服务状态查询结果,对服务状态异常的服务实例进行告警处理。
第二方面,提供了一种微服务监控系统,所述系统包括服务注册中心、监控中心和服务网关,其中:
所述服务注册中心,用于对微服务的服务实例进行注册;
所述监控中心,用于发送状态获取请求至所述服务网关;
所述服务网关包括:
前处理器,用于接收所述状态获取请求;
查询处理器,用于从所述服务注册中心获取所述状态获取请求指示的服务实例的注册记录,并根据所述注册记录,查询所述指示的服务实例的服务状态;
结果处理器,用于将服务状态查询结果发送至所述监控中心;
所述监控中心,还用于接收所述服务状态查询结果并进行相应处理。
进一步地,所述服务注册中心还用于:
与所述服务实例使用心跳机制保持通信,若通信中断时间超过预设时间,则注销所述服务实例。
进一步地,所述查询处理器包括:
服务处理器,用于从所述注册记录中获取所述指示的服务实例的网络地址;
服务广播插件,用于根据所述网络地址,向所述指示的服务实例发送服务状态的查询请求,并接收所述指示的服务实例返回的服务状态查询结果。
进一步地,所述服务状态包括CPU使用率、内存使用率、磁盘读写、网络连接状态、heapSize信息和heapUsedSize信息的一种或多种。
进一步地,所述监控中心具体用于:
对所述服务状态查询结果进行存储;
将所述服务状态查询结果进行页面展示;
根据所述服务状态查询结果,对服务状态异常的服务实例进行告警处理。
本发明实施例提供的技术方案带来的有益效果是:
1、由于微服务的扩容、缩容,无需进行手动配置,通过服务注册中心,能够动态获取微服务的服务实例,实现自动感知服务实例的目的,提升了微服务的监控便利性;
2、传统方式采用定时机制上传服务状态,而本发明实施例中,监控中心可以通过服务网关实时获取服务实例的最新服务状态,时效性高,提升了监控时效性,且无需配置监控程序,不存在资源被监控程序占用问题。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例一提供的一种微服务监控方法的流程图;
图2是本发明实施例二提供的一种微服务监控系统的框图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
在本申请的描述中,需要理解的是,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。此外,在本申请的描述中,除非另有说明,“多个”的含义是两个或两个以上。
图1是本发明实施例一提供的一种微服务监控方法的流程图,如图1所示,该方法可以包括步骤:
101、服务注册中心对微服务的服务实例进行注册。
具体的,服务注册中心接收微服务在启动时主动发送的服务实例的注册信息,并根据服务实例的注册信息对服务实例进行注册。
其中,注册信息包括微服务名称、网络地址、端口、若干服务实例等信息。
服务注册中心完成对微服务的服务实例进行注册后,会生成服务实例的注册记录并存储,以方便后续在服务网关对服务实例的注册信息的调取使用。
在一个示例性的实现过程中,在步骤101之后,方法还包括:
服务注册中心与服务实例使用心跳机制保持通信,若通信中断时间超过预设时间,则服务注册中心注销该服务实例。
具体的,微服务启动后,按预设周期时间(可以设定为30秒)地向服务注册中心发送心跳,若服务注册中心在预设时间(可以设定为90秒)内没有接收到该微服务的服务实例的心跳,将会注销该服务实例。
本发明实施例中,通过服务注册中心对微服务的服务实例进行注册,能够提升监控便利性,即对微服务的扩容、缩容,无需进行手动配置,只需通过服务注册中心,能够动态获取微服务的服务实例,实现自动感知服务实例的目的。
102、监控中心发送状态获取请求至服务网关。
本实施例中,状态获取请求可以是http请求,状态获取请求中可以包含有指定的服务实例的网络地址,该指定的服务实例可以是单个服务实例,也可以多个服务实例;此外,当在不指定服务实例的情形下,状态获取请求指示的服务实例则是服务注册中心中已注册过的所有服务实例。
其中,服务网关是利用SpringCloud+Zuul进行配置得到的分布式服务网关。
本发明实施例中,服务网关采用分布式去中心化部署架构,避免了传统方式中通过对服务实例进行部署监控程序,而监控程序可能会出现宕机的情形出现,由此避免了单点问题,满足了高可用性。
103、服务网关接收状态获取请求,并从服务注册中心获取状态获取请求指示的服务实例的注册记录。
其中,服务网关包括前处理器(pre Filters)、查询处理器(route filters)和结果处理器(post Filters)等多个内部组件,查询处理器进一步包括服务广播插件和服务处理器。
具体的,该过程可以包括:
由服务网关中的前处理器接收状态获取请求,对该状态获取请求进行预处理,进一步的,对状态获取请求进行预处理之前,还可以包括前处理器对状态 获取请求进行校验的步骤;
由查询处理器中的服务处理器根据负载均衡策略,向服务注册中心请求获取该状态获取请求指示的服务实例的注册记录,并接收服务注册中心返回的该状态获取请求指示的服务实例的注册记录。
需要说明的是,若状态获取请求指示的服务实例是服务注册中心未注册的服务实例时,则服务网关生成请求失败消息以指示状态获取请求指示的服务实例未经注册,并将请求失败信息返回至监控中心。
104、服务网关根据注册记录,查询指示的服务实例的服务状态,并将服务状态查询结果发送至监控中心。
具体的,该过程可以包括:
由查询处理器中的服务广播插件从注册记录中获取指示的服务实例的网络地址,将状态获取请求广播至该状态获取请求指示的服务实例上,并接收指示的服务实例返回的服务状态查询结果;
由服务网关中的结果处理器对服务状态查询结果进行封装处理,并发送至监控中心。
其中,服务状态包括CPU使用率、内存使用率、磁盘读写、网络连接状态、heapSize信息和heapUsedSize信息的一种或多种。
105、监控中心接收服务状态查询结果并进行相应处理。
具体的,监控中心对服务状态查询结果进行相应处理,可以包括:
对服务状态查询结果进行存储;和/或
将服务状态查询结果进行页面展示;和/或
根据服务状态查询结果,对服务状态异常的服务实例进行告警处理。
具体的,对服务状态查询结果进行分析,判断服务实例的服务状态存在异常,当服务实例的服务状态存在异常时,通过进行告警处理可以保证及时告知用户,从而能够方便用户及时对服务实例进行处理。
本发明实施例中,监控中心可以通过服务网关中的“服务广播功能”实时 获取服务注册中心已注册的指定服务实例或者全部服务实例的服务状态,从而实现实时获取服务实例的最新服务状态的目的,与传统方式采用定时机制上传服务状态相比较而言,能够极大地提升监控时效性。
图2是本发明实施例二提供的一种微服务监控系统的框图,该系统包括服务注册中心21、监控中心22和服务网关23,其中:
服务注册中心21,用于对微服务的服务实例进行注册;
监控中心22,用于发送目标服务实例的状态获取请求至服务网关;
服务网关23包括:
前处理器231,用于接收状态获取请求;
查询处理器232,用于从服务注册中心获取状态获取请求指示的服务实例的注册记录,并根据注册记录,查询指示的服务实例的服务状态;
结果处理器233,用于将目标服务实例的服务状态查询结果发送至监控中心22;
监控中心22,还用于接收服务状态查询结果并进行相应处理。
进一步地,服务注册中心21还用于:
与服务实例使用心跳机制保持通信,若通信中断时间超过预设时间,则注销服务实例。
进一步地,查询处理器232包括:
服务处理器,用于从注册记录中获取指示的服务实例的网络地址;
服务广播插件,用于根据网络地址,向指示的服务实例发送服务状态的查询请求,并接收指示的服务实例返回的服务状态查询结果。
进一步地,服务状态包括CPU使用率、内存使用率、磁盘读写、网络连接状态、heapSize信息和heapUsedSize信息的一种或多种。
进一步地,监控中心22具体用于:
对服务状态查询结果进行存储;
将服务状态查询结果进行页面展示;
根据服务状态查询结果,对服务状态异常的服务实例进行告警处理。
需要说明的是:上述实施例提供的微服务监控系统中,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将系统的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述微服务监控系统与微服务监控方法实施例属于同一构思,其具体实现过程和有益效果详见微服务监控方法实施例,这里不再赘述。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关联的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (10)

  1. 一种微服务监控方法,其特征在于,所述方法包括:
    服务注册中心对微服务的服务实例进行注册;
    监控中心发送状态获取请求至服务网关;
    所述服务网关接收所述状态获取请求,并从所述服务注册中心获取所述状态获取请求指示的服务实例的注册记录;
    所述服务网关根据所述注册记录,查询所述指示的服务实例的服务状态,并将服务状态查询结果发送至所述监控中心;
    所述监控中心接收所述服务状态查询结果并进行相应处理。
  2. 根据权利要求1所述的方法,其特征在于,所述服务注册中心对微服务的服务实例进行注册步骤之后,所述方法还包括:
    所述服务注册中心与所述服务实例使用心跳机制保持通信,若通信中断时间超过预设时间,则所述服务注册中心注销所述服务实例。
  3. 根据权利要求1所述的方法,其特征在于,所述服务网关根据所述注册记录,查询所述指示的服务实例的服务状态包括:
    从所述注册记录中获取所述指示的服务实例的网络地址;
    根据所述网络地址,向所述指示的服务实例发送服务状态的查询请求,并接收所述指示的服务实例返回的服务状态查询结果。
  4. 根据权利要求1所述的方法,其特征在于,所述服务状态包括CPU使用率、内存使用率、磁盘读写、网络连接状态、heapSize信息和heapUsedSize信息的一种或多种。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述相应处理包括:
    对所述服务状态查询结果进行存储;和/或
    将所述服务状态查询结果进行页面展示;和/或
    根据所述服务状态查询结果,对服务状态异常的服务实例进行告警处理。
  6. 一种微服务监控系统,其特征在于,所述系统包括服务注册中心、监控中心和服务网关,其中:
    所述服务注册中心,用于对微服务的服务实例进行注册;
    所述监控中心,用于发送状态获取请求至所述服务网关;
    所述服务网关包括:
    前处理器,用于接收所述状态获取请求;
    查询处理器,用于从所述服务注册中心获取所述状态获取请求指示的服务实例的注册记录,并根据所述注册记录,查询所述指示的服务实例的服务状态;
    结果处理器,用于将服务状态查询结果发送至所述监控中心;
    所述监控中心,还用于接收所述服务状态查询结果并进行相应处理。
  7. 根据权利要求6所述的系统,其特征在于,所述服务注册中心还用于:
    与所述服务实例使用心跳机制保持通信,若通信中断时间超过预设时间,则注销所述服务实例。
  8. 根据权利要求6所述的系统,其特征在于,所述查询处理器包括:
    服务处理器,用于从所述注册记录中获取所述指示的服务实例的网络地址;
    服务广播插件,用于根据所述网络地址,向所述指示的服务实例发送服务状态的查询请求,并接收所述指示的服务实例返回的服务状态查询结果。
  9. 根据权利要求6所述的系统,其特征在于,所述服务状态包括CPU使用率、内存使用率、磁盘读写、网络连接状态、heapSize信息和heapUsedSize信息的一种或多种。
  10. 根据权利要求6至9任一项所述的系统,其特征在于,所述监控中心具体用于:
    对所述服务状态查询结果进行存储;
    将所述服务状态查询结果进行页面展示;
    根据所述服务状态查询结果,对服务状态异常的服务实例进行告警处理。
PCT/CN2019/106781 2019-01-18 2019-09-19 一种微服务监控方法及系统 WO2020147331A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CA3168289A CA3168289A1 (en) 2019-01-18 2019-09-19 Method and system for monitoring microservices

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910048020.9 2019-01-18
CN201910048020.9A CN109873736A (zh) 2019-01-18 2019-01-18 一种微服务监控方法及系统

Publications (1)

Publication Number Publication Date
WO2020147331A1 true WO2020147331A1 (zh) 2020-07-23

Family

ID=66917690

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/106781 WO2020147331A1 (zh) 2019-01-18 2019-09-19 一种微服务监控方法及系统

Country Status (3)

Country Link
CN (1) CN109873736A (zh)
CA (1) CA3168289A1 (zh)
WO (1) WO2020147331A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112291099A (zh) * 2020-11-02 2021-01-29 西南电子技术研究所(中国电子科技集团公司第十研究所) 移动环境下多模式注册中心架构切换方法
CN114827277A (zh) * 2022-05-06 2022-07-29 北京思特奇信息技术股份有限公司 基于多机房容器部署的微服务系统及方法
CN116319090A (zh) * 2023-05-18 2023-06-23 中国电子信息产业集团有限公司第六研究所 一种基于微服务的动力与环境监控系统及方法

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109873736A (zh) * 2019-01-18 2019-06-11 苏宁易购集团股份有限公司 一种微服务监控方法及系统
CN110311900A (zh) * 2019-06-19 2019-10-08 微梦创科网络科技(中国)有限公司 一种服务调用方法、装置、电子设备及存储介质
CN110708356B (zh) * 2019-09-06 2024-01-05 国云科技股份有限公司 一种注册中心管理第三方应用的方法和系统
CN110602208B (zh) * 2019-09-12 2022-01-21 北京笔新互联网科技有限公司 一种分布式微服务治理系统及系统的构建方法
CN111078688B (zh) * 2019-11-18 2022-10-18 福建天泉教育科技有限公司 微服务健康检查的方法、存储介质
CN112988405B (zh) * 2019-12-02 2023-12-26 中国移动通信集团浙江有限公司 微服务自动降级方法、装置及计算设备
CN111198804B (zh) * 2019-12-30 2023-09-05 中电工业互联网有限公司 基于网关的工业互联网平台第三方微服务监控预警方法
CN111277499A (zh) * 2020-01-14 2020-06-12 浙江华云信息科技有限公司 基于gateway网关实时生效的动态路由方法
CN112579319B (zh) * 2020-12-07 2023-09-08 中国民航信息网络股份有限公司 一种基于LRU Cache优化的服务调用方法及装置
CN114640657A (zh) * 2020-12-16 2022-06-17 北京国双科技有限公司 多注册中心的融合方法、装置
CN113285836B (zh) * 2021-05-27 2022-05-10 中国人民解放军陆军工程大学 一种基于微服务实时迁移的软件系统韧性增强系统及方法
CN113938374B (zh) * 2021-12-20 2022-06-03 飞狐信息技术(天津)有限公司 一种监控仪表盘的处理方法及装置
CN115811458A (zh) * 2022-11-17 2023-03-17 浪潮云信息技术股份公司 一种基于springboot微服务的监控方法及系统
CN117609973A (zh) * 2024-01-23 2024-02-27 江苏博云科技股份有限公司 一种注册中心纳管方法、系统、装置及服务器

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106610836A (zh) * 2016-12-23 2017-05-03 国网信息通信产业集团有限公司 一种微服务运行管理工具
CN107566153A (zh) * 2017-07-21 2018-01-09 哈尔滨工程大学 一种自管理的微服务实现方法
CN107612955A (zh) * 2016-07-12 2018-01-19 深圳市远行科技股份有限公司 微服务提供方法、装置及系统
US20180270122A1 (en) * 2017-03-20 2018-09-20 Red Hat, Inc. Automatic microservice problem detection in enterprise applications
CN109873736A (zh) * 2019-01-18 2019-06-11 苏宁易购集团股份有限公司 一种微服务监控方法及系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104349338B (zh) * 2013-07-25 2018-01-19 普天信息技术有限公司 一种对传感器接入网关进行监控的方法和系统
CN108306917A (zh) * 2017-01-13 2018-07-20 中国移动通信集团江西有限公司 数据处理方法和装置、微服务模块的注册方法及装置
CN108512689B (zh) * 2017-12-15 2021-08-27 中国平安财产保险股份有限公司 微服务业务监控方法及服务器
CN108282368A (zh) * 2018-01-24 2018-07-13 云宏信息科技股份有限公司 一种微服务管理系统、方法及计算机存储介质
CN108845910B (zh) * 2018-05-31 2024-02-06 康键信息技术(深圳)有限公司 大规模微服务系统的监控方法、装置及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107612955A (zh) * 2016-07-12 2018-01-19 深圳市远行科技股份有限公司 微服务提供方法、装置及系统
CN106610836A (zh) * 2016-12-23 2017-05-03 国网信息通信产业集团有限公司 一种微服务运行管理工具
US20180270122A1 (en) * 2017-03-20 2018-09-20 Red Hat, Inc. Automatic microservice problem detection in enterprise applications
CN107566153A (zh) * 2017-07-21 2018-01-09 哈尔滨工程大学 一种自管理的微服务实现方法
CN109873736A (zh) * 2019-01-18 2019-06-11 苏宁易购集团股份有限公司 一种微服务监控方法及系统

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112291099A (zh) * 2020-11-02 2021-01-29 西南电子技术研究所(中国电子科技集团公司第十研究所) 移动环境下多模式注册中心架构切换方法
CN112291099B (zh) * 2020-11-02 2022-07-29 西南电子技术研究所(中国电子科技集团公司第十研究所) 移动环境下多模式注册中心架构切换方法
CN114827277A (zh) * 2022-05-06 2022-07-29 北京思特奇信息技术股份有限公司 基于多机房容器部署的微服务系统及方法
CN114827277B (zh) * 2022-05-06 2023-12-01 北京思特奇信息技术股份有限公司 基于多机房容器部署的微服务系统及方法
CN116319090A (zh) * 2023-05-18 2023-06-23 中国电子信息产业集团有限公司第六研究所 一种基于微服务的动力与环境监控系统及方法
CN116319090B (zh) * 2023-05-18 2023-08-11 中国电子信息产业集团有限公司第六研究所 一种基于微服务的动力与环境监控系统及方法

Also Published As

Publication number Publication date
CN109873736A (zh) 2019-06-11
CA3168289A1 (en) 2020-07-23

Similar Documents

Publication Publication Date Title
WO2020147331A1 (zh) 一种微服务监控方法及系统
US10547693B2 (en) Security device capability discovery and device selection
EP2791819B1 (en) Content delivery network
WO2019210580A1 (zh) 访问请求处理方法、装置、计算机设备和存储介质
CN109173270B (zh) 一种游戏服务系统和实现方法
US11953997B2 (en) Systems and methods for cross-regional back up of distributed databases on a cloud service
CN112953982B (zh) 一种服务处理的方法、服务配置的方法以及相关装置
CN115150419B (zh) 一种混合云对象存储的配置和访问方法及系统
CN116107828A (zh) 主节点选择方法、分布式数据库及存储介质
CN110830582B (zh) 一种基于服务器集群选主方法和装置
US10498617B1 (en) System, method, and computer program for highly available and scalable application monitoring
CN105490847B (zh) 一种私有云存储系统中节点故障实时检测及处理方法
CN114448686A (zh) 一种基于微服务的跨网络通信装置与方法
CN110290163A (zh) 一种数据处理方法及装置
CN112468310B (zh) 流媒体集群节点管理方法、装置及存储介质
US11595471B1 (en) Method and system for electing a master in a cloud based distributed system using a serverless framework
CN113055461B (zh) 一种基于ZooKeeper的无人集群分布式协同指挥控制方法
CN115134373A (zh) 数据同步方法、装置、存储介质及电子设备
CN110971872B (zh) 一种基于分布式集群的视频图像信息采集方法
JP2011134005A (ja) 構成情報管理装置、分散情報管理システム、分散情報管理方法および分散情報管理プログラム
US11824947B2 (en) Connecting application instances to client devices
US20150100685A1 (en) Apparatus and method for supporting intra-cloud and inter-cloud expansion of service
WO2020029978A1 (zh) 分配存储设备的方法、装置、设备及存储介质
CN116405497A (zh) 多机房优先策略访问的方法、系统、终端设备及存储介质
WO2022220830A1 (en) Geographically dispersed hybrid cloud cluster

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19909770

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19909770

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19909770

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3168289

Country of ref document: CA

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC DATED 17.02.2022 (EPO FORM 1205A)

122 Ep: pct application non-entry in european phase

Ref document number: 19909770

Country of ref document: EP

Kind code of ref document: A1