CN112187521A - Apollo-based system for realizing industrial internet distributed service degradation - Google Patents

Apollo-based system for realizing industrial internet distributed service degradation Download PDF

Info

Publication number
CN112187521A
CN112187521A CN202010940297.5A CN202010940297A CN112187521A CN 112187521 A CN112187521 A CN 112187521A CN 202010940297 A CN202010940297 A CN 202010940297A CN 112187521 A CN112187521 A CN 112187521A
Authority
CN
China
Prior art keywords
sentinel
apollo
client
rule
industrial internet
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202010940297.5A
Other languages
Chinese (zh)
Inventor
旷黎明
师文庆
刘小苏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Weiyi Intelligent Manufacturing Technology Co ltd
Changzhou Weiyizhi Technology Co Ltd
Original Assignee
Shanghai Weiyi Intelligent Manufacturing Technology Co ltd
Changzhou Weiyizhi Technology Co Ltd
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 Shanghai Weiyi Intelligent Manufacturing Technology Co ltd, Changzhou Weiyizhi Technology Co Ltd filed Critical Shanghai Weiyi Intelligent Manufacturing Technology Co ltd
Priority to CN202010940297.5A priority Critical patent/CN112187521A/en
Publication of CN112187521A publication Critical patent/CN112187521A/en
Pending legal-status Critical Current

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/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
    • H04L41/5025Ensuring fulfilment of SLA by proactively reacting to service quality change, e.g. by reconfiguration after service quality degradation or upgrade
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/215Flow control; Congestion control using token-bucket

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an Apollo-based system for realizing distributed service degradation of an industrial Internet, which comprises: a Sentinel client for receiving a user request; a Sentinel server, comprising: an Apollo configuration center and a Sentinil Dashboard end; the Apollo configuration center is used for forming a degradation rule; and the Sentinel Dashboard end is used for pushing a corresponding rule to the Sentinel client end according to the received request, so that the Sentinel client end matches with the module memory according to the user request path, and controls the number of requests according to a token bucket algorithm. The availability of some functions can be selectively reduced or directly shut down in response to a large number of requests to ensure high availability of core functions in order to prevent system downtime and to provide a more user friendly experience.

Description

Apollo-based system for realizing industrial internet distributed service degradation
Technical Field
The invention relates to the technical field of data request processing of an industrial internet distributed system, in particular to an Apollo-based system for realizing industrial internet distributed service degradation.
Background
Industrial internet is a result of the convergence of global industrial systems with advanced computing, analytics, sensing technologies and internet connectivity. The equipment, production lines, factories, suppliers, products and customers can be tightly connected and fused through an open and global industrial-level network platform, various element resources in industrial economy are efficiently shared, and the manufacturing industry is helped to prolong the industrial chain. Therefore, a large number of users are included in the industrial internet, and thus the processing of user requests becomes an important technology of the industrial internet.
In the internet, as the number of users of the system increases, the concurrency capability borne by the system is limited, and in the prior art, when a large number of user requests cannot be processed in time, the system is down, so that the user experience is poor.
Disclosure of Invention
The invention aims to provide an Apollo-based industrial Internet distributed service degradation system, which aims to ensure high availability of core functions under a large number of requests to selectively reduce the availability of some functions or directly close the functions, and aims to prevent system downtime and provide a more friendly experience for users.
In order to achieve the above object, there is provided an Apollo-based industrial internet distributed service degradation system, the system including:
a Sentinel client for receiving a user request;
a Sentinel server, comprising: an Apollo configuration center and a Sentinil Dashboard end;
the Apollo configuration center is used for forming a degradation rule;
and the Sentinel Dashboard end is used for pushing a corresponding rule to the Sentinel client end according to the received request, so that the Sentinel client end matches with the module memory according to the user request path, and controls the number of requests according to a token bucket algorithm.
In one implementation, the Sentinel server further comprises a console,
the control console carries out preset operation on the registered Sentinel client, wherein the preset operation comprises operations of adding, deleting, modifying and checking, and acquiring an application identifier (application ID) and contents needing to be operated of the registered Sentinel client.
In one implementation, the Sentinel client is specifically configured to, including:
intercepting a protected resource;
triggering slot chain execution;
collecting calling and running information by the statistical slots;
judging whether the slot meets a degradation rule or not;
if yes, blocking;
otherwise, a license is issued.
In one implementation, the Sentinel Dashboard is further configured to:
acquiring Token capable of performing regular operation on the Apollo private space;
reading a configuration output class from Apollo, wherein the output class can dynamically acquire a space specified by Apollo and a reading rule under the environment and push the rule;
and converting the dynamic custom rule read from the Apollo into a specified JSON format through a Converter built in the Sentinel Converter, and pushing the JSON format to a Sentinel client.
In one implementation, the Sentinel client is specifically configured to:
mapping a global cache table through a Sentinel ProcessSlotc processing chain, wherein a processing chain (ProcessSlotChain) is commonly used by the same resource name in the cache table;
and if the number of the simultaneously entered resources exceeds the maximum data, current limiting is not executed on the request, and fusing calculation is carried out.
In one implementation, the Sentinel client is further configured to:
under the same resource condition, if the concurrency amount of the simultaneous requests exceeds a set threshold value, the degradation measure is directly taken, the incoming requests are refused to be received, and the user is returned to prompt.
The system for realizing industrial internet distributed service degradation based on Apollo provided by the embodiment of the invention has the following beneficial effects:
(1) in order to prevent system downtime and to give the user a more friendly experience.
(2) The problem of being able to guarantee high availability of core functions under a large number of requests while selectively reducing the availability of some functions or directly shutting down the functions is solved.
(3) By integrating the Sentinel middleware, the current limitation of the request based on the memory form can be realized; and by integrating the Apollo configuration center, the current-limiting degradation can be realized by dynamically pushing the rules to each resource.
(4) The method comprises the steps that a pushing event and monitoring are adopted for pushing data, the data are registered to a Server end when a client is initialized, the Server end pushes the data to the client and caches the data in contents through a rule of pulling the client from Apollo after sensing information, and dynamic current limiting operation is achieved.
Drawings
Fig. 1 is a schematic diagram of an embodiment of an industrial internet distributed service degradation system implemented based on Apollo according to the embodiment of the present invention.
Fig. 2 is a schematic diagram of another specific embodiment of the system for implementing distributed service degradation of the industrial internet based on Apollo according to the embodiment of the present invention.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention.
Please refer to fig. 1-2. It should be noted that the drawings provided in the present embodiment are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
As shown in fig. 1 and 2, the present invention provides an Apollo-based industrial internet distributed service downgrading system, which includes:
and the Sentinel client is used for receiving the user request.
A Sentinel server, comprising: apollo configuration center and Sentinel Dashboard end.
The Apollo configuration center is used for forming a downgrading rule.
And the Sentinel Dashboard end is used for pushing a corresponding rule to the Sentinel client end according to the received request, so that the Sentinel client end matches with the module memory according to the user request path, and controls the number of requests according to a token bucket algorithm.
In the embodiment of the invention, a Sentinel Server local visual interface console is deployed firstly for outputting and inputting custom rules, and the realized technical scheme comprises the following steps:
firstly, a Token which can perform regular operation on the Apollo private space is obtained, so that the subsequent operation of dynamically increasing, deleting, modifying and checking the Apollo by directly using a code is facilitated;
defining a configuration output class read from Apollo, and mainly playing roles in dynamically reading a rule and pushing the rule in a NameSpace space and an environment specified by Apollo;
converting the dynamic custom rule read from Apollo into a specified JSON format through a Converter built in the Sentinel Converter, and pushing the JSON format to a Client end;
defining input, performing increasing, deleting, modifying and checking operation on a registered client end from a console, acquiring an application identification (application ID) of the registered client end and content needing to be operated, performing Sentinel converter (system framework self-contained function) conversion into a specified JSON format, and dynamically pushing the incoming application ID and content to an Apollo through a function createOrUpdateItem of the Apollo;
and setting specific operators and authority for Apollo through a function NamespaceReleaseDTO (a function carried by a system framework), and whether to push the Apollo to a client side in time.
At a client end, firstly, the client end is defined, rules pushed by a Sentinel Server are dynamically received, and the rules are cached to the local.
In the initialization process, a client registers self information into a Sentinl Server;
by realizing the init initialization of the InitFunc (system framework with function), the information of the InitFunc is registered in the Sentinel during initialization, and the rule push message from the Sentinel Server is received and replaced into the content. The current limitation of the service is realized by adding a function @ SentinelResource (a system framework with a function).
When a request enters a service, a method of @ Sentinel resource is added through Aop surrounding notification, a bottom layer processes a CHAIN through Sentinel processslotc (storing the content of a single resource rule, and being a function carried in a frame) according to the method of obtaining the interception and the specific content of the request, chainMap has a global cache table, and the same resource name can use one processslotchain (system frame function carried in by itself) together, that is, when different threads access the code protected by the same resource, the threads can use each processslotchoot (system frame function carried in itself) in the processslotchain together, if the number of the resources entering at the same time exceeds MAX _ SLOT _ CHAIN _ SIZE, and the default is 6000, null is returned, and the current limitation is not performed on the request, and the calculation is blown, but the current limitation is directly skipped. The current limit rule resources cannot exceed (MAX _ SLOT _ CHAIN _ SIZE)6000, and the current limit function is not supported if the current limit rule resources exceed (MAX _ SLOT _ CHAIN _ SIZE).
And finally, limiting the current according to an atomic counter and a token bucket through a FlowSlot (system framework self-contained function), and under the same resource condition, if the concurrency of the simultaneous requests exceeds a set threshold value, directly taking a degradation measure, not receiving the incoming requests, but returning the incoming requests to the user instead, namely a friendly prompt
According to the embodiment of the invention, the Sentinel middleware is integrated, the current limiting can be realized on the request based on the memory form, and the Apollo configuration center is integrated, so that the current limiting degradation can be realized on each resource pushed by the rule dynamically.
The method comprises the steps of adopting a published event dynamic rule publishing function to analyze and process changed data, pushing different resources to affiliated Application resources of different Apollo, realizing rule persistence operation and dynamic operation, adopting a pushing event and monitoring a dynamic rule provider (a system framework self-contained function) to push pushed data to a client side through pulling a rule of the client side from the Apollo after the client side is initialized and registering the pushed data to the Server side, caching the pushed data to contents through the rule of the client side after the Server side senses information, and realizing dynamic current limiting operation.
In one implementation, the Sentinel client is specifically configured to, including:
intercepting a protected resource;
triggering slot chain execution;
collecting calling and running information by the statistical slots;
judging whether the slot meets a degradation rule or not;
if yes, blocking;
otherwise, a license is issued.
It should be noted that the protected resource is added only when the interface prevents the avalanche effect of the service under the high concurrency condition, and is an interface current limiting rule added through a Sentinel Server side dashboard interface. The relation between the triggering degradation rule and the protected resource is that the protected resource is an interface defining rule, and the triggering is that when the interface defining the rule is requested by a user, the request can be intercepted by sentinel to trigger degradation.
The slot chain means that a plurality of different slots are matched with each other in the bottom layer work flow of the Sentinel, and the process of triggering the slot chain is that each time a resource is called, an entry object is established by default, a corresponding slot is established in the entry bottom layer, the process of counting the collection, calling and running information of the slots is also completed in the slot chain, and finally the collection, calling and running information of the slots is displayed on a dashboard interface of a Sentinel Server end.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (6)

1. An Apollo-based industrial Internet distributed service downgrading system, comprising:
a Sentinel client for receiving a user request;
a Sentinel server, comprising: an Apollo configuration center and a Sentinil Dashboard end;
the Apollo configuration center is used for forming a degradation rule;
and the Sentinel Dashboard end is used for pushing a corresponding rule to the Sentinel client end according to the received request, so that the Sentinel client end matches with the module memory according to the user request path, and controls the number of requests according to a token bucket algorithm.
2. The Apollo based industrial Internet distributed service downgrading system according to claim 1, wherein said Sentinel server further comprises a console,
the control console carries out preset operation on the registered Sentinel client, wherein the preset operation comprises operations of adding, deleting, modifying and checking, and acquiring an application identifier (application ID) and contents needing to be operated of the registered Sentinel client.
3. The system according to claim 2, wherein the Sentinel client is specifically configured to, including:
intercepting a protected resource;
triggering slot chain execution;
collecting calling and running information by the statistical slots;
judging whether the slot meets a degradation rule or not;
if yes, blocking;
otherwise, a license is issued.
4. The distributed Apollo-based industrial internet service downgrading system according to any of claims 1 to 3, wherein the Sentinel Dashboard is further configured to:
acquiring Token capable of performing regular operation on the Apollo private space;
reading a configuration output class from Apollo, wherein the output class can dynamically acquire a space specified by Apollo and a reading rule under the environment and push the rule;
and converting the dynamic custom rule read from the Apollo into a specified JSON format through a Converter built in the Sentinel Converter, and pushing the JSON format to a Sentinel client.
5. The Apollo-based industrial Internet distributed service degradation system according to claim 4, wherein the Sentinel client is specifically configured to:
mapping a global cache table through a Sentinel processsrslotc processing chain, wherein the same resource name in the cache table can share one processing chain;
and if the number of the simultaneously entered resources exceeds the maximum data, current limiting is not executed on the request, and fusing calculation is carried out.
6. The Apollo based industrial Internet distributed service degradation system according to claim 5, wherein the Sentinel client is further configured to:
under the same resource condition, if the concurrency amount of the simultaneous requests exceeds a set threshold value, the degradation measure is directly taken, the incoming requests are refused to be received, and the user is returned to prompt.
CN202010940297.5A 2020-09-09 2020-09-09 Apollo-based system for realizing industrial internet distributed service degradation Pending CN112187521A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010940297.5A CN112187521A (en) 2020-09-09 2020-09-09 Apollo-based system for realizing industrial internet distributed service degradation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010940297.5A CN112187521A (en) 2020-09-09 2020-09-09 Apollo-based system for realizing industrial internet distributed service degradation

Publications (1)

Publication Number Publication Date
CN112187521A true CN112187521A (en) 2021-01-05

Family

ID=73920213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010940297.5A Pending CN112187521A (en) 2020-09-09 2020-09-09 Apollo-based system for realizing industrial internet distributed service degradation

Country Status (1)

Country Link
CN (1) CN112187521A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106713028A (en) * 2016-12-20 2017-05-24 北京小米移动软件有限公司 Service degradation method and apparatus, and distributed task scheduling system
US20190215239A1 (en) * 2016-09-19 2019-07-11 Huawei Technologies Co., Ltd. Microservice Configuration Apparatus and Method
CN111475382A (en) * 2020-04-09 2020-07-31 杭州趣维科技有限公司 Service fusing, degrading and current limiting system based on sentinel
CN111614570A (en) * 2020-04-20 2020-09-01 北京邮电大学 Flow control system and method for service grid

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190215239A1 (en) * 2016-09-19 2019-07-11 Huawei Technologies Co., Ltd. Microservice Configuration Apparatus and Method
CN106713028A (en) * 2016-12-20 2017-05-24 北京小米移动软件有限公司 Service degradation method and apparatus, and distributed task scheduling system
CN111475382A (en) * 2020-04-09 2020-07-31 杭州趣维科技有限公司 Service fusing, degrading and current limiting system based on sentinel
CN111614570A (en) * 2020-04-20 2020-09-01 北京邮电大学 Flow control system and method for service grid

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
程序猿DD: "Spring Cloud Alibaba基础教程:Sentinel使用Apollo存储规则 https://developer.aliyun.com/article/699190", 《阿里云》 *
风平浪静如码: "Spring Cloud微服务Sentinel+Apollo限流、熔断实战https://blog.csdn.net/woshinidadaye_/article/details/104160414", 《CSDN》 *

Similar Documents

Publication Publication Date Title
US10776107B2 (en) Microservice-based data processing apparatus, method, and program
CN110019087B (en) Data processing method and system
US10521263B2 (en) Generic communication architecture for cloud microservice infrastructure
CN111291103A (en) Interface data analysis method and device, electronic equipment and storage medium
US10554701B1 (en) Real-time call tracing in a service-oriented system
CN107066519A (en) A kind of task detection method and device
CN109284321A (en) Data load method, calculates equipment and computer readable storage medium at device
CN112084179A (en) Data processing method, device, equipment and storage medium
CN111142863A (en) Page generation method and device
CN110555038A (en) Data processing system, method and device
US10979515B1 (en) Resource discovery agent computing device, software application, and method
CN107451301B (en) Processing method, device, equipment and storage medium for real-time delivery bill mail
CN115793911A (en) Data processing method and device, electronic equipment and storage medium
CN114153703A (en) Micro-service exception positioning method and device, electronic equipment and program product
CN113761565B (en) Data desensitization method and device
CN113761856A (en) Data processing method and device
CN112187521A (en) Apollo-based system for realizing industrial internet distributed service degradation
CN112988857B (en) Service data processing method and device
CN113362097A (en) User determination method and device
US10122643B2 (en) Systems and methods for reorganization of messages in queuing systems
CN115495518B (en) Method and device for generating chart
CN114268558B (en) Method, device, equipment and medium for generating monitoring graph
CN115063923B (en) Voting processing method, voting processing system, voting processing device, electronic equipment and storage medium
CN113282443A (en) Method and device for monitoring real-time data
CN117992204A (en) Memory detection method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210105