CN108600005A - A method of defence micro services avalanche effect - Google Patents

A method of defence micro services avalanche effect Download PDF

Info

Publication number
CN108600005A
CN108600005A CN201810366617.3A CN201810366617A CN108600005A CN 108600005 A CN108600005 A CN 108600005A CN 201810366617 A CN201810366617 A CN 201810366617A CN 108600005 A CN108600005 A CN 108600005A
Authority
CN
China
Prior art keywords
micro services
threshold value
unit interval
rule
priority
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.)
Withdrawn
Application number
CN201810366617.3A
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.)
G Cloud Technology Co Ltd
Original Assignee
G Cloud 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 G Cloud Technology Co Ltd filed Critical G Cloud Technology Co Ltd
Priority to CN201810366617.3A priority Critical patent/CN108600005A/en
Publication of CN108600005A publication Critical patent/CN108600005A/en
Withdrawn legal-status Critical Current

Links

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/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers

Abstract

The present invention relates to cloud platform micro services technical field, especially a kind of method of defence micro services avalanche effect.The method of the present invention includes the following steps:1:Load balancing weight scheduling rule is set, supports the lifting to micro services priority;2:Fusing mechanism is set;3:Start fusing mechanism when micro services exception;4:Starting load equalizing weight scheduling rule when micro services fail;5:Fusing mechanism is closed when micro services are restored;6:Scheduling rule is given tacit consent in starting load equilibrium when micro services are restored.The present invention solves the problems such as micro services avalanche effect brings system bottleneck, even entire platform collapse;It can be applied to the micro services management of cloud platform.

Description

A method of defence micro services avalanche effect
Technical field
The present invention relates to cloud platform micro services technical field, especially a kind of method of defence micro services avalanche effect.
Background technology
There is the service routine of substantial amounts on general cloud computing platform, and may in each calculate node or control node There are multiple micro services programs being currently running;And calculate node also runs multiple virtual machines.On each virtual machine equally One or more micro services programs may have been run.Due to many virtual machines micro services program may all may cross-call, If a micro services occur abnormal overtime at this time, request can consume the resources such as thread, the IO of occupancy system.When such request is more next More, the computer resource of occupancy is also more and more;System bottleneck can be caused to occur, cause the request of other micro services equally not It can use;Eventually lead to entire platform collapse.
Invention content
The present invention provides a kind of method of defence micro services avalanche effect, solves above-mentioned prior art problem;Support fusing Mechanism and the mode supported dynamic load leveling scheduling, avoid the occurrence of system bottleneck, to system when effectively reducing service exception The resource consumption brought can defend micro services avalanche effect.
The technical solution that the present invention solves above-mentioned prior art problem is:
The method includes the following steps:
Step 1:Load balancing weight scheduling rule is set, supports the lifting to micro services priority;
Step 2:Fusing mechanism is set;I.e. micro services itself call other specific micro services frequency of abnormity unit interval, Threshold value and error message;
Step 3:Start fusing mechanism when micro services exception;Micro services fusing calling is specific in incognito when i.e. exception reaches threshold value The request of business, and return to error message;
Step 4:Starting load equalizing weight scheduling rule when micro services fail;By micro services priority within the unit interval It reduces;
Step 5:Fusing mechanism is closed when micro services are restored;Refer to the specific micro services of micro services requesting itself and restores normal, this When close fusing mechanism, the specific micro services of normal request;
Step 6:Scheduling rule is given tacit consent in starting load equilibrium when micro services are restored.
The load balancing refers to sharing user's request in multiple micro services to execute, to complete work jointly Make task, quick response user request;It is optimal response time rule to give tacit consent to scheduling rule;
The weight scheduling rule refers to that the frequency of failure is more than that the micro services priority of threshold value drops to most in the unit interval It is low, then the higher micro services of other priority are selected according still further to optimal response time rule;Unit interval can be arranged, acquiescence It it is 5 minutes, threshold value acquiescence is 20 times;
The optimal response time rule refers to being sorted according to the same priority each micro services response time, excellent First send a request to response time most fast micro services.
The unit interval of the micro services frequency of abnormity of the setting fusing mechanism and threshold value refer to response in the unit interval Time-out or communication abnormality number are more than threshold value, and the default units time is 5 seconds, and threshold value is 20 requests.
The fusing is called, and refers to that micro services degrade, and is no longer sent and is asked to specific micro services;And all requests Directly return to the error message of malloc failure malloc.
In the step 6, load balancing reselects the micro services just restored, statistics is in incognito after the unit interval The business request frequency of failure has been unsatisfactory for threshold value within the unit interval, promotes micro services priority;When all micro services priority When consistent, adjustment load balancing rule is acquiescence scheduling rule, i.e. optimal response time rule, balance again it is each in incognito The load of business.
The present invention solves micro services avalanche effect and brings system bottle by a kind of method of defence micro services avalanche effect The problems such as neck, even entire platform collapse.The method that the present invention defends micro services avalanche effect, is to go reality by fusing mechanism It is existing, it is different from other methods.The method provided by the present invention is to optimize the rule of load balancing, provides support dynamic adjustment scheduling rule Then, it supports the lifting to micro services priority, ensures that fusing machine makes now rear micro services and is capable of providing High Availabitity high success rate, area Not in the method for the load balancing for not supporting the lifting of micro services priority.The present invention fusing plus by way of load balancing, Both can to avoid due to server occur fusing mechanism quick response so as to cause the micro services receive instead more multi-request cause The problem of asking high failure rate, and can wait until to provide service call again in the case of service abnormal restoring.The method of the present invention is logical It crosses and optimizes traditional load balancing service, find that fusing mechanism occur in micro services in time, quickly dynamic adjusts rule, improves in incognito The calling success rate of business.
Description of the drawings
The following further describes the present invention with reference to the drawings:
Fig. 1 is flow chart of the present invention.
Specific implementation mode
There are many embodiments of the present invention, illustrates one of which implementation method by taking cloud platform as an example here, flow chart is such as Shown in Fig. 1, specific implementation process is as follows
1, load balancing weight scheduling rule is set, code is as follows:
Load balancing refers to that user asks to share in multiple micro services to execute, to complete task jointly, Quick response user asks;It is optimal response time rule to give tacit consent to scheduling rule.
Weight scheduling rule refers to that the frequency of failure is more than that the micro services priority of threshold value is preferably minimized in the unit interval, so Afterwards the higher micro services of other priority are selected according still further to optimal response time rule;Unit interval can be arranged, and acquiescence is 5 points Clock, threshold value acquiescence is 20 times;
Optimal response time rule refers to according to each micro services response time sequence of the same priority, preferential transmission It asks to give the response time most fast micro services.
2, fusing mechanism is set, code is as follows:
Fusing mechanism is set, refers to the unit that the frequency of abnormity that a micro services itself call other specific micro services is set Time, threshold value and error message;
The unit interval of micro services frequency of abnormity and threshold value refer to that response timeout or communication abnormality number are super in the unit interval Threshold value is crossed, the default units time is 5 seconds, and threshold value is 20 requests.
3, start fusing mechanism when micro services exception, code is as follows:
Start fusing mechanism when micro services exception, refers to that a micro services itself call other specific micro services frequency of abnormity Reach threshold value within the unit interval, micro services itself, which will fuse, calls the request of this specific micro services, and returns to wrong letter Breath;
Fusing is called, and refers to that micro services degrade, and is no longer sent and is asked to specific micro services;And all requests are directly returned Return the error message of malloc failure malloc.
4, starting load equalizing weight scheduling rule when micro services fail, pseudocode are as follows:
Starting load equalizing weight scheduling rule when micro services fail, refers to that load balancing exists according to the micro services frequency of failure In the case of meeting threshold value in unit interval, start weight scheduling rule;Micro services priority is reduced within the unit interval, is carried Height request success rate.
5, fusing mechanism is closed when micro services are restored, code is as follows:
Fusing mechanism is closed when micro services are restored, and is referred to that the specific micro services of micro services requesting itself restore normal, is closed at this time Close fusing mechanism, the specific micro services of normal request.
6, scheduling rule is given tacit consent in starting load equilibrium when micro services are restored
Scheduling rule is given tacit consent in starting load equilibrium when micro services are restored, and load balancing reselects after the unit interval The micro services just restored, the statistics micro services request frequency of failure have been unsatisfactory for threshold value within the unit interval, it is excellent to promote micro services First grade;When all micro services priority are consistent, when adjustment load balancing rule is acquiescence scheduling rule, i.e. optimal response Between rule, balance the load of each micro services again.
Whole flow process terminates.

Claims (7)

1. a kind of method of defence micro services avalanche effect, it is characterised in that:The method includes the following steps:
Step 1:Load balancing weight scheduling rule is set, supports the lifting to micro services priority;
Step 2:Fusing mechanism is set;I.e. micro services itself call the unit interval of other specific micro services frequency of abnormity, threshold value And error message;
Step 3:Start fusing mechanism when micro services exception;Specific micro services are called in micro services fusing when i.e. exception reaches threshold value Request, and return to error message;
Step 4:Starting load equalizing weight scheduling rule when micro services fail;Micro services priority is dropped within the unit interval It is low;
Step 5:Fusing mechanism is closed when micro services are restored;Refer to the specific micro services of micro services requesting itself and restore normal, closes at this time Close fusing mechanism, the specific micro services of normal request;
Step 6:Scheduling rule is given tacit consent in starting load equilibrium when micro services are restored.
2. according to the method described in claim 1, it is characterized in that:The load balancing refer to by user request share it is more It is executed in a micro services, to complete task, quick response user request jointly;It is best sound to give tacit consent to scheduling rule Answer time rule;
The weight scheduling rule refers to that the frequency of failure is more than that the micro services priority of threshold value is preferably minimized in the unit interval, Then the higher micro services of other priority are selected according still further to optimal response time rule;Unit interval can be arranged, and acquiescence is 5 Minute, threshold value acquiescence is 20 times;
The optimal response time rule refers to according to each micro services response time sequence of the same priority, preferential hair Request is sent to give the response time most fast micro services.
3. according to the method described in claim 1, it is characterized in that:The micro services frequency of abnormity of the setting fusing mechanism Unit interval and threshold value refer to that response timeout or communication abnormality number are more than threshold value in the unit interval, and the default units time is 5 Second, threshold value is 20 requests.
4. according to the method described in claim 2, it is characterized in that:The micro services frequency of abnormity of the setting fusing mechanism Unit interval and threshold value refer to that response timeout or communication abnormality number are more than threshold value in the unit interval, and the default units time is 5 Second, threshold value is 20 requests.
5. method according to any one of claims 1 to 4, it is characterised in that:The fusing is called, and refers to by micro services Degrade, no longer sends and ask to specific micro services;And all requests directly return to the error message of malloc failure malloc.
6. method according to any one of claims 1 to 4, it is characterised in that:In the step 6, load balancing is in list After the time of position, the micro services just restored are reselected, the statistics micro services request frequency of failure has been discontented within the unit interval Sufficient threshold value promotes micro services priority;When all micro services priority are consistent, adjustment load balancing rule is that acquiescence is adjusted Then, i.e. optimal response time rule balances the load of each micro services to metric again.
7. according to the method described in claim 5, it is characterized in that:In the step 6, load balancing the unit interval it Afterwards, the micro services just restored are reselected, the statistics micro services request frequency of failure has been unsatisfactory for threshold value within the unit interval, has carried Rise micro services priority;When all micro services priority are consistent, adjustment load balancing rule is acquiescence scheduling rule, i.e., Optimal response time rule balances the load of each micro services again.
CN201810366617.3A 2018-04-23 2018-04-23 A method of defence micro services avalanche effect Withdrawn CN108600005A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810366617.3A CN108600005A (en) 2018-04-23 2018-04-23 A method of defence micro services avalanche effect

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810366617.3A CN108600005A (en) 2018-04-23 2018-04-23 A method of defence micro services avalanche effect

Publications (1)

Publication Number Publication Date
CN108600005A true CN108600005A (en) 2018-09-28

Family

ID=63614693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810366617.3A Withdrawn CN108600005A (en) 2018-04-23 2018-04-23 A method of defence micro services avalanche effect

Country Status (1)

Country Link
CN (1) CN108600005A (en)

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109597605A (en) * 2018-10-22 2019-04-09 平安科技(深圳)有限公司 Using micro services dispositions method, device, storage medium and terminal device
CN110309016A (en) * 2019-06-13 2019-10-08 北京奇艺世纪科技有限公司 A kind of fusing restoration methods, device and server
CN110990245A (en) * 2019-12-04 2020-04-10 北京明略软件系统有限公司 Micro-service operation state judgment method and device based on call chain data
CN110995472A (en) * 2019-11-15 2020-04-10 苏州浪潮智能科技有限公司 Method and system for fusing micro-service
CN111049670A (en) * 2019-11-07 2020-04-21 苏宁云计算有限公司 Method and device for fusing isolation of micro-service
CN111078453A (en) * 2019-12-17 2020-04-28 深圳前海环融联易信息科技服务有限公司 Method and device for automatically fusing and recovering micro-service, computer equipment and storage medium
CN111130939A (en) * 2019-12-26 2020-05-08 深圳前海环融联易信息科技服务有限公司 Flow control method and device, computer equipment and storage medium
CN111416888A (en) * 2020-04-07 2020-07-14 中国建设银行股份有限公司 Addressing method and device based on service gateway
WO2020211222A1 (en) * 2019-04-15 2020-10-22 厦门市美亚柏科信息股份有限公司 Method and device for providing micro-service based on data service platform, and storage medium
CN112187511A (en) * 2020-08-28 2021-01-05 苏州浪潮智能科技有限公司 Method, system, equipment and medium for positioning micro-service fusing abnormity
CN112540895A (en) * 2019-09-20 2021-03-23 北京国双科技有限公司 Micro-service management method, device and equipment
CN112988546A (en) * 2021-04-21 2021-06-18 福建天晴在线互动科技有限公司 Fusing scheme and system for preventing service avalanche of payment system
CN113254203A (en) * 2021-05-18 2021-08-13 百果园技术(新加坡)有限公司 Service degradation processing method and device
CN114710503A (en) * 2022-04-21 2022-07-05 思必驰科技股份有限公司 Service scheduling method, electronic device and storage medium
CN115174686A (en) * 2022-07-12 2022-10-11 江苏苏宁银行股份有限公司 Method and device for dynamically adjusting weights of multiple service channels based on service efficiency
CN116980480A (en) * 2023-09-25 2023-10-31 上海伊邦医药信息科技股份有限公司 Method and system for processing fusing information based on micro-service network model

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105743934A (en) * 2014-12-08 2016-07-06 网宿科技股份有限公司 HTTP access availability optimization method and mobile intelligent terminal
CN106227605A (en) * 2016-07-26 2016-12-14 北京北森云计算股份有限公司 The dynamic micro services expansion method of a kind of multilingual cloud compiling and device
CN106656630A (en) * 2017-01-13 2017-05-10 北京中电普华信息技术有限公司 Electric marketing service application system, and construction method and platform thereof
CN107171828A (en) * 2017-04-18 2017-09-15 北京思特奇信息技术股份有限公司 It is a kind of to tackle overtime blowout method and the system that far call is relied on
US20180077138A1 (en) * 2016-09-14 2018-03-15 Oracle International Corporation Generating derived credentials for a multi-tenant identity cloud service

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105743934A (en) * 2014-12-08 2016-07-06 网宿科技股份有限公司 HTTP access availability optimization method and mobile intelligent terminal
CN106227605A (en) * 2016-07-26 2016-12-14 北京北森云计算股份有限公司 The dynamic micro services expansion method of a kind of multilingual cloud compiling and device
US20180077138A1 (en) * 2016-09-14 2018-03-15 Oracle International Corporation Generating derived credentials for a multi-tenant identity cloud service
CN106656630A (en) * 2017-01-13 2017-05-10 北京中电普华信息技术有限公司 Electric marketing service application system, and construction method and platform thereof
CN107171828A (en) * 2017-04-18 2017-09-15 北京思特奇信息技术股份有限公司 It is a kind of to tackle overtime blowout method and the system that far call is relied on

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SPRINKLE_LIZ: "服务容错保护——Spring Cloud Hystrix", 《HTTPS://WWW.JIANSHU.COM/P/6C574ABE50C1》 *
网易云基础服务架构团队: "网易云原生架构实践之服务治理", 《HTTPS://WWW.INFOQ.CN/ARTICLE/SERVICE-GOVERNANCE-OF-NETEASE-CLOUD-NATIVE》 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109597605A (en) * 2018-10-22 2019-04-09 平安科技(深圳)有限公司 Using micro services dispositions method, device, storage medium and terminal device
WO2020211222A1 (en) * 2019-04-15 2020-10-22 厦门市美亚柏科信息股份有限公司 Method and device for providing micro-service based on data service platform, and storage medium
CN110309016A (en) * 2019-06-13 2019-10-08 北京奇艺世纪科技有限公司 A kind of fusing restoration methods, device and server
CN112540895A (en) * 2019-09-20 2021-03-23 北京国双科技有限公司 Micro-service management method, device and equipment
CN111049670A (en) * 2019-11-07 2020-04-21 苏宁云计算有限公司 Method and device for fusing isolation of micro-service
CN110995472A (en) * 2019-11-15 2020-04-10 苏州浪潮智能科技有限公司 Method and system for fusing micro-service
CN110990245A (en) * 2019-12-04 2020-04-10 北京明略软件系统有限公司 Micro-service operation state judgment method and device based on call chain data
CN111078453A (en) * 2019-12-17 2020-04-28 深圳前海环融联易信息科技服务有限公司 Method and device for automatically fusing and recovering micro-service, computer equipment and storage medium
CN111078453B (en) * 2019-12-17 2024-03-29 深圳前海环融联易信息科技服务有限公司 Method, device, computer equipment and storage medium for automatically fusing and recovering micro-service
CN111130939A (en) * 2019-12-26 2020-05-08 深圳前海环融联易信息科技服务有限公司 Flow control method and device, computer equipment and storage medium
CN111416888A (en) * 2020-04-07 2020-07-14 中国建设银行股份有限公司 Addressing method and device based on service gateway
CN112187511A (en) * 2020-08-28 2021-01-05 苏州浪潮智能科技有限公司 Method, system, equipment and medium for positioning micro-service fusing abnormity
WO2022042007A1 (en) * 2020-08-28 2022-03-03 苏州浪潮智能科技有限公司 Method, system, and device for locating micro-service fuse anomaly, and medium
CN112988546A (en) * 2021-04-21 2021-06-18 福建天晴在线互动科技有限公司 Fusing scheme and system for preventing service avalanche of payment system
CN113254203A (en) * 2021-05-18 2021-08-13 百果园技术(新加坡)有限公司 Service degradation processing method and device
CN114710503A (en) * 2022-04-21 2022-07-05 思必驰科技股份有限公司 Service scheduling method, electronic device and storage medium
CN115174686A (en) * 2022-07-12 2022-10-11 江苏苏宁银行股份有限公司 Method and device for dynamically adjusting weights of multiple service channels based on service efficiency
CN115174686B (en) * 2022-07-12 2024-03-15 江苏苏宁银行股份有限公司 Method and device for dynamically adjusting weights of multiple service channels based on service efficiency
CN116980480A (en) * 2023-09-25 2023-10-31 上海伊邦医药信息科技股份有限公司 Method and system for processing fusing information based on micro-service network model
CN116980480B (en) * 2023-09-25 2024-02-27 上海伊邦医药信息科技股份有限公司 Method and system for processing fusing information based on micro-service network model

Similar Documents

Publication Publication Date Title
CN108600005A (en) A method of defence micro services avalanche effect
US10491535B2 (en) Adaptive data synchronization
CN110196761B (en) Delayed task processing method and device
US11496913B2 (en) Load migration method, apparatus, and system
CN108011899B (en) Session establishment optimization method, device and system
CN110442610A (en) The method, apparatus of load balancing calculates equipment and medium
CN111045816B (en) Performance optimization method and related device
CN110677274A (en) Event-based cloud network service scheduling method and device
WO2017185615A1 (en) Method for determining service status of service processing device and scheduling device
CN110750780B (en) User role permission fusion method, device and equipment based on multi-service system
CN116185623A (en) Task allocation method and device, electronic equipment and storage medium
US11513856B2 (en) Method, devices and computer program products for resource usage
CN105763545A (en) BYOD method and device
US11836528B2 (en) Throttling thread resources of service computing platform
CN109587068B (en) Flow switching method, device, equipment and computer readable storage medium
US10635997B1 (en) Finite life instances
CN114024968B (en) Message sending method and device based on intermediate equipment and electronic equipment
CN115776510A (en) Control method and device of heartbeat packet, processor and electronic equipment
CN112291326B (en) Load balancing method, load balancing device, storage medium and electronic equipment
EP3129878B1 (en) Elasticity engine for availability management framework (amf)
CN113301177A (en) Domain name anti-blocking method and device
JP3891273B2 (en) Transaction processing load balancing method and system
CN110944051B (en) Method and device for realizing load balance, electronic equipment and storage medium
CN110874256A (en) Computing cluster updating system, method and device
CN115037753B (en) Message notification method and system

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20180928