CN110737567A - Server-side interface fusing method and device based on cache - Google Patents

Server-side interface fusing method and device based on cache Download PDF

Info

Publication number
CN110737567A
CN110737567A CN201910986371.4A CN201910986371A CN110737567A CN 110737567 A CN110737567 A CN 110737567A CN 201910986371 A CN201910986371 A CN 201910986371A CN 110737567 A CN110737567 A CN 110737567A
Authority
CN
China
Prior art keywords
interface
fusing
fuse
request
cache
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
CN201910986371.4A
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.)
Ji Qi (chengdu) Science And Technology Co Ltd
Original Assignee
Ji Qi (chengdu) Science And 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 Ji Qi (chengdu) Science And Technology Co Ltd filed Critical Ji Qi (chengdu) Science And Technology Co Ltd
Priority to CN201910986371.4A priority Critical patent/CN110737567A/en
Publication of CN110737567A publication Critical patent/CN110737567A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the application provides cache-based server-side interface fusing methods and devices, the method comprises the steps of receiving success requests and failure requests received by a target interface within set time to obtain a request success rate of the target interface, determining a corresponding interface fusing strategy according to the request success rate of the target interface, and executing corresponding fusing operation on the target interface according to the interface fusing strategy.

Description

Server-side interface fusing method and device based on cache
Technical Field
The application relates to the field of data processing, in particular to cache-based server-side interface fusing methods and devices.
Background
The current interface fuse is mainly designed based on an interface fusing function, the main design purpose of the current interface fuse is to prevent an avalanche effect from occurring when various services on which an interface depends fail, for example, when an upstream interface delays, the downstream interface cannot respond to a request quickly because the upstream interface responds slowly, such an effect can be accumulated gradually and finally causes the whole service system to crash, in order to prevent the problem, the interface fuse cuts off a request link when the upstream interface cannot provide stable service, the downstream interface cannot be affected by the abnormality of the upstream service after the cut-off, but the integrity of the whole service is also damaged, the traditional fuse can cause all or part of the service to be unavailable, and the condition is unacceptable for most applications providing 24-hour high-stability service.
Disclosure of Invention
Aiming at the problems in the prior art, the server-side interface fusing methods and devices based on the cache are provided, the interface caching mode can be effectively combined, the server information feedback capacity is guaranteed, and therefore the smoothness and reliability of data interaction and the user experience are improved.
In order to solve at least of the above-mentioned problem, this application provides following technical scheme:
, the present application provides methods for fusing a cache-based server interface, comprising:
receiving a success request and a failure request received by a target interface within a set time to obtain the request success rate of the target interface;
and determining a corresponding interface fusing strategy according to the request success rate of the target interface, and executing corresponding fusing operation on the target interface according to the interface fusing strategy.
, the determining the corresponding interface fusing policy according to the request success rate of the target interface includes:
if the request success rate of the target interface belongs to the th preset threshold range, determining an interface fusing strategy as that the fuse is closed;
if the request success rate of the target interface belongs to a second preset threshold range, determining an interface fusing strategy as fuse opening;
and if the request success rate of the target interface belongs to a third preset threshold range, determining the interface fusing strategy as half-open of the fuse.
, further comprising:
if the interface fusing strategy is that the fuse is closed, interrupting the request receiving function of the target interface;
if the interface fusing strategy is that the fuse is opened, intercepting a request received by the target interface, inquiring to obtain corresponding cache information according to a preset cache database, and returning the cache information;
and if the interface fusing strategy is the fuse half-open, determining the interface fusing strategy as the fuse open, continuously monitoring the request success rate of the target interface, and if the request success rate belongs to a fourth preset threshold range, determining the interface fusing strategy as the fuse close.
, further comprising:
judging whether the target interface receives a success request;
and if so, copying and storing the feedback information corresponding to the successful request into the preset cache database.
In a second aspect, the present application provides a cache-based server-side interface fusing apparatus, including:
the request success rate determining module is used for receiving a success request and a failure request received by a target interface within set time to obtain the request success rate of the target interface;
and the interface fusing module is used for determining a corresponding interface fusing strategy according to the request success rate of the target interface and executing corresponding fusing operation on the target interface according to the interface fusing strategy.
, the interface fusing module includes:
the fuse closing determining unit is used for determining the interface fusing strategy as the fuse closing if the request success rate of the target interface belongs to the th preset threshold range;
the fuse opening determining unit is used for determining an interface fusing strategy as fuse opening if the request success rate of the target interface belongs to a second preset threshold range;
and the fuse half-opening determining unit is used for determining the interface fusing strategy as the fuse half-opening if the request success rate of the target interface belongs to a third preset threshold range.
, further comprising:
the fuse shutdown execution unit is used for interrupting the request receiving function of the target interface if the interface fusing strategy is fuse shutdown;
the fuse starting execution unit is used for intercepting the request received by the target interface if the interface fusing strategy is fuse starting, inquiring to obtain corresponding cache information according to a preset cache database, and returning the cache information;
and the fuse half-opening execution unit is used for determining the interface fusing strategy as the fuse opening if the interface fusing strategy is the fuse half-opening, continuously monitoring the request success rate of the target interface, and determining the interface fusing strategy as the fuse closing if the request success rate belongs to a fourth preset threshold range.
, further comprising:
a request success judging unit, configured to judge whether the target interface receives a success request;
and the cache storage unit is used for copying and storing the feedback information corresponding to the successful request into the preset cache database.
In a third aspect, the present application provides electronic devices, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method for fusing a cache-based server interface when executing the program.
In a fourth aspect, the present application provides computer-readable storage media having stored thereon a computer program that, when executed by a processor, performs the steps of the cache-based server interface fusing method.
According to the technical scheme, cache-based server-side interface fusing methods and devices are provided, the request success rate of a target interface is obtained by receiving a success request and a failure request received by the target interface within a set time, a corresponding interface fusing strategy is determined according to the request success rate of the target interface, and corresponding fusing operation is executed on the target interface according to the interface fusing strategy.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are embodiments of the present application, and other drawings can be obtained according to these drawings by those skilled in the art without creative efforts.
FIG. 1 is a flow chart illustrating a method for fusing a cache-based server interface according to an embodiment of the present invention;
FIG. 2 is a second flowchart illustrating a method for fusing a cache-based server interface according to an embodiment of the present application;
fig. 3 is a third schematic flowchart of a method for fusing a cache-based server interface according to an embodiment of the present application;
fig. 4 is a fourth schematic flowchart of a method for fusing a cache-based server interface in an embodiment of the present application;
FIG. 5 is a block diagram of a cache-based server interface fusing device according to an embodiment of the present application;
FIG. 6 is a second block diagram of a fusing apparatus for a cache-based server interface according to an embodiment of the present invention;
FIG. 7 is a third block diagram of a fusing apparatus for a cache-based server interface in an embodiment of the present application;
FIG. 8 is a fourth block diagram of a fusing apparatus for a cache-based server interface in an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device in an embodiment of the present application.
Detailed Description
For purposes of clarity, technical solutions and advantages of the embodiments of the present application, the embodiments of the present application will be described in detail and completely with reference to the drawings of the embodiments of the present application, and it is to be understood that the described embodiments are some, but not all, embodiments .
Considering that the design of the current interface fuse is mainly based on an interface fusing function, the main design purpose of the interface fuse is to prevent an avalanche effect from occurring when various services dependent on the interface fail, for example, when an upstream interface delays, a downstream interface cannot respond to a request quickly because the upstream interface responds slowly, the influence is accumulated gradually and finally causes the whole service system to crash, in order to prevent the problem, the interface fuse cuts a request link when the upstream interface cannot provide stable service, the downstream interface cannot be influenced by the abnormality of the upstream service after the cutting, but the integrity of the whole service is damaged, and the traditional fuse causes the problem that the service is completely or partially unavailable.
In order to effectively combine an interface caching mode and guarantee the server information feedback capacity, so as to promote the smoothness and reliability of data interaction and user experience, the present application provides embodiments of a cache-based server-side interface fusing method, and referring to fig. 1, the cache-based server-side interface fusing method specifically includes the following contents:
step S101: and receiving a success request and a failure request received by a target interface within a set time to obtain the request success rate of the target interface.
It can be understood that the system can perform statistics on request success rate through types of modes called buckets of the fuse, each buckets have two numerical values of successful request number (S for short) and failed request number (F for short), the numerical values are counted according to success or failure of the request, S +1 when the request succeeds, F +1 when the request fails, the total number of the requests is S + F, the calculation method of the success rate is F/(S + F), the fuse creates buckets every 10 seconds and destroys buckets, so the statistical range is set as the request success rate within the time range of 10 seconds, the specific destruction time can be adjusted according to the absolute number of the requests, and the design can ensure that the request success rate within the time range does not lose statistical significance due to the fact that the total request base number is too large.
Step S102: and determining a corresponding interface fusing strategy according to the request success rate of the target interface, and executing corresponding fusing operation on the target interface according to the interface fusing strategy.
It can be understood that the system can perform request success rate statistics through a Bucket statistics mode of the fuse, when the request success rate changes, the fuse can adjust the current state of the fuse according to the specific success rate, the actual working state of the request is controlled through the state flow, for example, when the fuse is in an open state, all requests are intercepted by the fuse, and data return is attempted by using a cache.
Specifically, the fuse may include three operating states, 1, a fuse-off state, 2, a fuse-on state, and 3, a fuse-half-open state, where a standard operating state of the fuse is a fuse-off state, where the fuse does not currently interrupt any request, the fuse enters an open state when a success rate of the request is lower than a certain setting value, the open state refers to that all requests passing through the fuse are intercepted, and after the interception, the cache system is queried according to a hash value of a parameter of the current request, if the cache system has a cache, a degradation service is provided by returning cache data, if the cache is not found, an interface exception is directly returned, and after an exception condition lasts for periods of time, the fuse automatically enters a half-open state, and the half-open state refers to that the fuse releases a portion of requests after entering the state, the portion of requests receives feedback and turns to the closed state if the access is successful, the fuse recovers to the standard operating state, and if any of the released portion of requests return failure state keeps the fuse in an open state and waits for half-open states.
As can be seen from the above description, the method for fusing a server interface based on a cache provided in the embodiment of the present application can obtain a request success rate of a target interface by receiving a success request and a failure request received by the target interface within a set time; according to the method and the device, when a dependent interface of a certain function breaks down, the user is prevented from obviously sensing that the service is abnormal during the interface fault, the unaware degradation service is provided through the cache, the information feedback capacity of the server is guaranteed, and therefore the smoothness and the reliability of data interaction and the user experience are improved.
In order to accurately adopt the corresponding interface fusing strategy, in an embodiment of the cache-based server-side interface fusing method according to the present application, referring to fig. 2, the following is also specifically included:
and step S201, if the request success rate of the target interface belongs to the th preset threshold range, determining the interface fusing strategy as the fuse is closed.
Step S202: and if the request success rate of the target interface belongs to a second preset threshold range, determining the interface fusing strategy as the fuse opening.
Step S203: and if the request success rate of the target interface belongs to a third preset threshold range, determining the interface fusing strategy as half-open of the fuse.
Optionally, the th preset threshold range, the second preset threshold range and the third preset threshold range may be set manually in advance, or may be determined by probability statistics or big data technology, for example, the th preset threshold range is set to have a request success rate greater than 80%, the second preset threshold range is set to have a request success rate less than 50%, and the third preset threshold range is set to have a request success rate between 50% and 80%.
In order to effectively adopt a corresponding interface fusing policy and execute a corresponding interface fusing operation, in an embodiment of the cache-based server-side interface fusing method according to the present application, referring to fig. 3, the following contents are further specifically included:
step S301: and if the interface fusing strategy is that the fuse is closed, interrupting the request receiving function of the target interface.
Step S302: and if the interface fusing strategy is that the fuse is opened, intercepting the request received by the target interface, inquiring to obtain corresponding cache information according to a preset cache database, and returning the cache information.
Step S303: and if the interface fusing strategy is the fuse half-open, determining the interface fusing strategy as the fuse open, continuously monitoring the request success rate of the target interface, and if the request success rate belongs to a fourth preset threshold range, determining the interface fusing strategy as the fuse close.
In order to effectively combine the cache manner, in an embodiment of the cache-based server interface fusing method according to the present application, referring to fig. 4, the following contents are further specifically included:
step S401: and judging whether the target interface receives a success request.
Step S402: and if so, copying and storing the feedback information corresponding to the successful request into the preset cache database.
In order to effectively combine an interface caching mode and guarantee the server information feedback capability, so as to promote smooth and reliable data interaction and user experience, embodiments of the cache-based server-side interface fusing device for implementing all or part of the contents of the cache-based server-side interface fusing method are provided in the present application, and referring to fig. 5, the cache-based server-side interface fusing device specifically includes the following contents:
the request success rate determining module 10 is configured to receive a success request and a failure request received by a target interface within a set time, and obtain a request success rate of the target interface.
And the interface fusing module 20 is configured to determine a corresponding interface fusing policy according to the request success rate of the target interface, and perform a corresponding fusing operation on the target interface according to the interface fusing policy.
As can be seen from the above description, the cache-based server-side interface fusing apparatus provided in the embodiment of the present application can obtain a request success rate of a target interface by receiving a success request and a failure request received by the target interface within a set time; according to the method and the device, when a dependent interface of a certain function breaks down, the user is prevented from obviously sensing that the service is abnormal during the interface fault, the unaware degradation service is provided through the cache, the information feedback capacity of the server is guaranteed, and therefore the smoothness and the reliability of data interaction and the user experience are improved.
In order to accurately adopt the corresponding interface fusing strategy, in embodiment of the cache-based server-side interface fusing apparatus of the present application, referring to fig. 6, the interface fusing module 20 includes:
and the fuse closing determining unit 21 is configured to determine the interface fusing strategy as a fuse closing if the request success rate of the target interface falls within the th preset threshold range.
And the fuse opening determining unit 22 is configured to determine the interface fusing strategy as a fuse opening if the request success rate of the target interface belongs to a second preset threshold range.
And the fuse half-open determining unit 23 is configured to determine the interface fusing strategy as a fuse half-open if the request success rate of the target interface belongs to a third preset threshold range.
In order to effectively adopt a corresponding interface fusing policy and execute a corresponding interface fusing operation, in an embodiment of the cache-based server-side interface fusing apparatus according to the present application, referring to fig. 7, the following is further specifically included:
and the fuse shutdown execution unit 31 is configured to interrupt the request receiving function of the target interface if the interface fusing policy is fuse shutdown.
And the fuse opening execution unit 32 is configured to intercept the request received by the target interface, obtain corresponding cache information according to a preset cache database by querying, and return the cache information if the interface fusing policy is fuse opening.
And the fuse half-opening execution unit 33 is configured to determine the interface fusing strategy as that the fuse is opened if the interface fusing strategy is fuse half-opening, continuously monitor the request success rate of the target interface, and determine the interface fusing strategy as that the fuse is closed if the request success rate belongs to a fourth preset threshold range.
In order to effectively combine the caching method, in an embodiment of the cache-based server interface fusing apparatus according to the present application, referring to fig. 8, the following contents are further specifically included:
a request success judging unit 41, configured to judge whether the target interface receives a success request.
And a cache storage unit 42, configured to copy and store the feedback information corresponding to the successful request in the preset cache database.
To further illustrate the scheme at , the present application further provides specific application examples of the method for implementing fusing of a cache-based server interface by using the above-mentioned cache-based server interface fusing device, which specifically include the following contents:
the fuse comprises three working states, namely 1, a fuse closing state, 2, a fuse opening state and 3, a fuse half-opening state, wherein the standard working state of the fuse is the closing state, the closing state refers to that the fuse does not interrupt any request currently, when the success rate of the request is lower than a certain set value, the fuse enters the opening state, the opening state refers to that all the requests passing through the fuse are intercepted currently, the cache system is inquired according to the hash value of the current request parameter after the interception, if the cache system has a cache, the degradation service is provided by returning cache data, if the cache is not found, the interface exception is directly returned, when the exception condition lasts for periods, the fuse automatically enters the half-opening state, the half-opening state refers to that the fuse releases part of the request after entering the state, the part of the request receives feedback if the fuse is accessed successfully and turns to the closing state, the fuse restores to the standard working state, and if any part of the released part of the request returns the failed fuse and keeps the fuse in the opening state and waits for half-opening.
Specifically, the fuse performs statistics on request success rate through modes called buckets, each buckets have two numerical values of success request number (S for short) and failure request number (F for short), the numerical values are counted through success or failure of the requests, S +1 when the requests succeed, F +1 when the requests fail, the total number of the requests is S + F, the success rate is calculated by F/(S + F), the fuse creates buckets every 10 seconds and destroys buckets, the statistical range is set as the request success rate within the 10-second time range, the specific destruction time can be adjusted according to the absolute number of the requests, and the design can ensure that the request success rate within the time range does not lose statistical significance due to overlarge total request base number.
The embodiment of the present application further provides a specific implementation manner of electronic devices that can implement all steps in the method for fusing a cache-based server interface in the foregoing embodiment, and referring to fig. 9, the electronic devices specifically include the following:
a processor (processor)601, a memory (memory)602, a communication interface (communications interface)603, and a bus 604;
the processor 601, the memory 602 and the communication interface 603 complete mutual communication through the bus 604; the communication interface 603 is used for realizing information transmission among a server-side interface fusing device based on cache, an online service system, client equipment and other participating mechanisms;
the processor 601 is configured to call a computer program in the memory 602, and when the processor executes the computer program, the processor implements all the steps in the cache-based server interface fusing method in the above embodiments, for example, when the processor executes the computer program, the processor implements the following steps:
step S101: and receiving a success request and a failure request received by a target interface within a set time to obtain the request success rate of the target interface.
Step S102: and determining a corresponding interface fusing strategy according to the request success rate of the target interface, and executing corresponding fusing operation on the target interface according to the interface fusing strategy.
As can be seen from the above description, the electronic device provided in the embodiment of the present application can obtain the request success rate of the target interface by receiving the success request and the failure request received by the target interface within the set time; according to the method and the device, when a dependent interface of a certain function breaks down, the user is prevented from obviously sensing that the service is abnormal during the interface fault, the unaware degradation service is provided through the cache, the information feedback capacity of the server is guaranteed, and therefore the smoothness and the reliability of data interaction and the user experience are improved.
The present application further provides computer-readable storage media capable of implementing all steps in the cache-based server interface fusing method in the foregoing embodiments, where the computer-readable storage medium stores thereon a computer program, and when the computer program is executed by a processor, the computer program implements all steps of the cache-based server interface fusing method in the foregoing embodiments, for example, when the processor executes the computer program, the processor implements the following steps:
step S101: and receiving a success request and a failure request received by a target interface within a set time to obtain the request success rate of the target interface.
Step S102: and determining a corresponding interface fusing strategy according to the request success rate of the target interface, and executing corresponding fusing operation on the target interface according to the interface fusing strategy.
As can be seen from the above description, the computer-readable storage medium provided in the embodiment of the present application can obtain the request success rate of the target interface by receiving the success request and the failure request received by the target interface within the set time; according to the method and the device, when a dependent interface of a certain function breaks down, the user is prevented from obviously sensing that the service is abnormal during the interface fault, the unaware degradation service is provided through the cache, the information feedback capacity of the server is guaranteed, and therefore the smoothness and the reliability of data interaction and the user experience are improved.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the hardware + program class embodiment, since it is substantially similar to the method embodiment, the description is simple, and the relevant points can be referred to the partial description of the method embodiment.
In addition, the processes depicted in the accompanying figures do not require the particular order shown or sequential order to achieve desirable results .
The steps recited in the embodiments are merely types of execution sequences of numerous steps and do not represent -only execution sequences of steps.
The systems, apparatuses, modules, or units illustrated in the above embodiments may be embodied as a computer chip or entity, or as an article of manufacture with some functionality exemplary implementing devices are computers specifically, computers may be, for example, personal computers, laptop computers, vehicle-mounted human interaction devices, cellular phones, camera phones, smart phones, personal digital assistants, media players, navigation devices, email devices, game consoles, tablet computers, wearable devices, or a combination of any of these devices.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In typical configurations, a computing device includes or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects.
The specification embodiments may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer , generally including routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types.
In particular, for system embodiments, because they are substantially similar to method embodiments, it may be convenient to refer to portions of the method embodiments for clarity, and reference may be made to the description of method embodiments herein for clarity.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and variations to the embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the embodiments of the present specification should be included in the scope of the claims of the embodiments of the present specification.

Claims (10)

1, A method for fusing a cache-based server interface, the method comprising:
receiving a success request and a failure request received by a target interface within a set time to obtain the request success rate of the target interface;
and determining a corresponding interface fusing strategy according to the request success rate of the target interface, and executing corresponding fusing operation on the target interface according to the interface fusing strategy.
2. The cache-based server-side interface fusing method of claim 1, wherein determining the corresponding interface fusing policy according to the request success rate of the target interface comprises:
if the request success rate of the target interface belongs to the th preset threshold range, determining an interface fusing strategy as that the fuse is closed;
if the request success rate of the target interface belongs to a second preset threshold range, determining an interface fusing strategy as fuse opening;
and if the request success rate of the target interface belongs to a third preset threshold range, determining the interface fusing strategy as half-open of the fuse.
3. The method of claim 2, further comprising:
if the interface fusing strategy is that the fuse is closed, interrupting the request receiving function of the target interface;
if the interface fusing strategy is that the fuse is opened, intercepting a request received by the target interface, inquiring to obtain corresponding cache information according to a preset cache database, and returning the cache information;
and if the interface fusing strategy is the fuse half-open, determining the interface fusing strategy as the fuse open, continuously monitoring the request success rate of the target interface, and if the request success rate belongs to a fourth preset threshold range, determining the interface fusing strategy as the fuse close.
4. The cache-based server-side interface fusing method of claim 3, further comprising:
judging whether the target interface receives a success request;
and if so, copying and storing the feedback information corresponding to the successful request into the preset cache database.
5, A fusing device for cache-based server interface, comprising:
the request success rate determining module is used for receiving a success request and a failure request received by a target interface within set time to obtain the request success rate of the target interface;
and the interface fusing module is used for determining a corresponding interface fusing strategy according to the request success rate of the target interface and executing corresponding fusing operation on the target interface according to the interface fusing strategy.
6. The cache-based server-side interface fusing apparatus of claim 5, wherein the interface fusing module comprises:
the fuse closing determining unit is used for determining the interface fusing strategy as the fuse closing if the request success rate of the target interface belongs to the th preset threshold range;
the fuse opening determining unit is used for determining an interface fusing strategy as fuse opening if the request success rate of the target interface belongs to a second preset threshold range;
and the fuse half-opening determining unit is used for determining the interface fusing strategy as the fuse half-opening if the request success rate of the target interface belongs to a third preset threshold range.
7. The cache-based server-side interface fusing apparatus of claim 6, further comprising:
the fuse shutdown execution unit is used for interrupting the request receiving function of the target interface if the interface fusing strategy is fuse shutdown;
the fuse starting execution unit is used for intercepting the request received by the target interface if the interface fusing strategy is fuse starting, inquiring to obtain corresponding cache information according to a preset cache database, and returning the cache information;
and the fuse half-opening execution unit is used for determining the interface fusing strategy as the fuse opening if the interface fusing strategy is the fuse half-opening, continuously monitoring the request success rate of the target interface, and determining the interface fusing strategy as the fuse closing if the request success rate belongs to a fourth preset threshold range.
8. The cache-based server-side interface fusing apparatus of claim 5, further comprising:
a request success judging unit, configured to judge whether the target interface receives a success request;
and the cache storage unit is used for copying and storing the feedback information corresponding to the successful request into the preset cache database.
An electronic device of 9, , comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor when executing the program performs the steps of the method of any of claims 1 to 4 for fusing a cache-based service-side interface of .
10, computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the cache-based server interface fusing method of any of claims 1 to 4 to .
CN201910986371.4A 2019-10-17 2019-10-17 Server-side interface fusing method and device based on cache Pending CN110737567A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910986371.4A CN110737567A (en) 2019-10-17 2019-10-17 Server-side interface fusing method and device based on cache

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910986371.4A CN110737567A (en) 2019-10-17 2019-10-17 Server-side interface fusing method and device based on cache

Publications (1)

Publication Number Publication Date
CN110737567A true CN110737567A (en) 2020-01-31

Family

ID=69270094

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910986371.4A Pending CN110737567A (en) 2019-10-17 2019-10-17 Server-side interface fusing method and device based on cache

Country Status (1)

Country Link
CN (1) CN110737567A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111290696A (en) * 2020-02-26 2020-06-16 平安银行股份有限公司 Flow control method and device for application program assembly
CN111814178A (en) * 2020-06-29 2020-10-23 四川长虹电器股份有限公司 Data callback fusing protection method for third-party application
CN111866156A (en) * 2020-07-27 2020-10-30 网易(杭州)网络有限公司 Fusing processing method and device
CN112416636A (en) * 2020-10-29 2021-02-26 中国人寿保险股份有限公司 Fusing method for accessing database and electronic equipment
CN112449017A (en) * 2020-11-25 2021-03-05 深圳市欢太科技有限公司 Server and control method thereof
CN113472879A (en) * 2021-06-29 2021-10-01 中国平安财产保险股份有限公司 Service request method, device, computer equipment and storage medium
CN113553233A (en) * 2021-07-19 2021-10-26 中国电信股份有限公司 Monitoring processing method, monitoring processing device, storage medium and electronic equipment
CN114357048A (en) * 2022-01-05 2022-04-15 携程旅游网络技术(上海)有限公司 Interface fusing method and system, electronic equipment and storage medium
CN114697060A (en) * 2020-12-29 2022-07-01 广州腾讯科技有限公司 Service control method, device and electronic equipment
CN115001956A (en) * 2022-05-24 2022-09-02 中国平安财产保险股份有限公司 Server cluster operation method, device, equipment and storage medium
CN115277588A (en) * 2022-06-22 2022-11-01 平安银行股份有限公司 Fusing current limiting system based on middle platform system
CN117806778A (en) * 2024-02-29 2024-04-02 济南浪潮数据技术有限公司 Resource management method, system, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060026454A1 (en) * 2004-07-30 2006-02-02 Fujitsu Limited Cache memory, processor, and production methods for cache memory and processor
CN108200180A (en) * 2018-01-08 2018-06-22 武汉斗鱼网络科技有限公司 A kind of method, apparatus and computer equipment for being used to limit request frequency
CN109766210A (en) * 2019-01-17 2019-05-17 多点生活(成都)科技有限公司 Service fusing control method, service fusing control device and server cluster
CN109948356A (en) * 2019-03-25 2019-06-28 江苏电力信息技术有限公司 One kind is based on service call authority control method under micro services framework
CN110309016A (en) * 2019-06-13 2019-10-08 北京奇艺世纪科技有限公司 A kind of fusing restoration methods, device and server

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060026454A1 (en) * 2004-07-30 2006-02-02 Fujitsu Limited Cache memory, processor, and production methods for cache memory and processor
CN108200180A (en) * 2018-01-08 2018-06-22 武汉斗鱼网络科技有限公司 A kind of method, apparatus and computer equipment for being used to limit request frequency
CN109766210A (en) * 2019-01-17 2019-05-17 多点生活(成都)科技有限公司 Service fusing control method, service fusing control device and server cluster
CN109948356A (en) * 2019-03-25 2019-06-28 江苏电力信息技术有限公司 One kind is based on service call authority control method under micro services framework
CN110309016A (en) * 2019-06-13 2019-10-08 北京奇艺世纪科技有限公司 A kind of fusing restoration methods, device and server

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LB: ""微服务:请求熔断原理"", 《HTTPS://ICORER.COM/ICORER_BLOG/POSTS/MICROSERVICES-PRINCIPLES-OF-REQUEST-FUSING/》 *
陈同学: ""Spring Cloud 源码学习之 Hystrix 熔断器"", 《MP.WEIXIN.QQ.COM/S.HLWX94WFWS8YMY968D284A》 *

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111290696A (en) * 2020-02-26 2020-06-16 平安银行股份有限公司 Flow control method and device for application program assembly
CN111814178A (en) * 2020-06-29 2020-10-23 四川长虹电器股份有限公司 Data callback fusing protection method for third-party application
CN111866156A (en) * 2020-07-27 2020-10-30 网易(杭州)网络有限公司 Fusing processing method and device
CN112416636A (en) * 2020-10-29 2021-02-26 中国人寿保险股份有限公司 Fusing method for accessing database and electronic equipment
CN112449017A (en) * 2020-11-25 2021-03-05 深圳市欢太科技有限公司 Server and control method thereof
CN112449017B (en) * 2020-11-25 2023-08-18 深圳市欢太科技有限公司 Service end and control method thereof
CN114697060A (en) * 2020-12-29 2022-07-01 广州腾讯科技有限公司 Service control method, device and electronic equipment
CN114697060B (en) * 2020-12-29 2024-05-07 广州腾讯科技有限公司 Service control method and device and electronic equipment
CN113472879A (en) * 2021-06-29 2021-10-01 中国平安财产保险股份有限公司 Service request method, device, computer equipment and storage medium
CN113472879B (en) * 2021-06-29 2023-12-08 中国平安财产保险股份有限公司 Service request method, device, computer equipment and storage medium
CN113553233A (en) * 2021-07-19 2021-10-26 中国电信股份有限公司 Monitoring processing method, monitoring processing device, storage medium and electronic equipment
CN114357048A (en) * 2022-01-05 2022-04-15 携程旅游网络技术(上海)有限公司 Interface fusing method and system, electronic equipment and storage medium
CN115001956A (en) * 2022-05-24 2022-09-02 中国平安财产保险股份有限公司 Server cluster operation method, device, equipment and storage medium
CN115001956B (en) * 2022-05-24 2023-06-16 中国平安财产保险股份有限公司 Method, device, equipment and storage medium for running server cluster
CN115277588A (en) * 2022-06-22 2022-11-01 平安银行股份有限公司 Fusing current limiting system based on middle platform system
CN115277588B (en) * 2022-06-22 2023-06-09 平安银行股份有限公司 Fusing current limiting system based on middle platform system
CN117806778A (en) * 2024-02-29 2024-04-02 济南浪潮数据技术有限公司 Resource management method, system, equipment and medium
CN117806778B (en) * 2024-02-29 2024-06-07 济南浪潮数据技术有限公司 Resource management method, system, equipment and medium

Similar Documents

Publication Publication Date Title
CN110737567A (en) Server-side interface fusing method and device based on cache
KR102140903B1 (en) Consensus method and device
TWI691853B (en) Service verification method and device
US10102097B2 (en) Transaction server performance monitoring using component performance data
CN111209110A (en) Task scheduling management method, system and storage medium for realizing load balance
CN111880906A (en) Virtual machine high-availability management method, system and storage medium
CN108733454B (en) Virtual machine fault processing method and device
CN110599305A (en) Service processing method, device and storage medium
CN109766198A (en) Stream Processing method, apparatus, equipment and computer readable storage medium
CN111538585A (en) Js-based server process scheduling method, system and device
CN109257196A (en) A kind of abnormality eliminating method and equipment
TW202226786A (en) Electronic apparatus for verifying code and method thereof
WO2024045980A1 (en) Method, apparatus and device for testing distributed timing message system
CN111159298B (en) Service request processing method and device, electronic equipment and storage medium
US11243979B1 (en) Asynchronous propagation of database events
CN112559565A (en) Abnormity detection method, system and device
CN110620734A (en) TCP link data processing method and device
CN113938527B (en) Extension processing method of API gateway, computing device and storage medium
CN110019023B (en) Method, device and equipment for pushing mechanism information message
CN109067611B (en) Method, device, storage medium and processor for detecting communication state between systems
CN114490135A (en) Task processing method and device, electronic equipment and storage medium
CN114327662A (en) Operating system processing method and device, storage medium and processor
CN113542027A (en) Flow isolation method, device and system based on distributed service architecture
US11050651B2 (en) Systems and methods for health monitoring and upgrade of a distributed controller
US9009546B2 (en) Heuristic failure prevention in software as a service (SAAS) systems

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

Application publication date: 20200131

RJ01 Rejection of invention patent application after publication