CN115617553A - Fusing degradation protection method and device for database and electronic equipment - Google Patents

Fusing degradation protection method and device for database and electronic equipment Download PDF

Info

Publication number
CN115617553A
CN115617553A CN202211225385.2A CN202211225385A CN115617553A CN 115617553 A CN115617553 A CN 115617553A CN 202211225385 A CN202211225385 A CN 202211225385A CN 115617553 A CN115617553 A CN 115617553A
Authority
CN
China
Prior art keywords
utilization rate
server cluster
resource utilization
current server
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.)
Pending
Application number
CN202211225385.2A
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.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202211225385.2A priority Critical patent/CN115617553A/en
Publication of CN115617553A publication Critical patent/CN115617553A/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/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0706Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment
    • G06F11/0709Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation the processing taking place on a specific hardware platform or in a specific software environment in a distributed system consisting of a plurality of standalone computer nodes, e.g. clusters, client-server systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Quality & Reliability (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a fusing degradation protection method and device for a database and electronic equipment, and relates to the technical field of electronics. The method comprises the following steps: acquiring a first resource utilization rate of a current server cluster, and judging whether the first resource utilization rate is greater than a resource utilization rate threshold value; if yes, acquiring the priority of each interface corresponding to the current server cluster, closing each interface with the first priority, and if not, maintaining the normal use of each interface corresponding to the current server cluster. By the method, fusing degradation is executed according to different priorities of the interfaces corresponding to the server cluster, and full utilization of database resources can be guaranteed to the greatest extent.

Description

Fusing degradation protection method and device for database and electronic equipment
Technical Field
The present disclosure relates to the field of electronic technologies, and in particular, to a method and an apparatus for protecting a database from fusing degradation, and an electronic device.
Background
At present, a software platform related to the security industry is a very large system, developers related to different organization structures cooperate together to complete development, in order to reduce system coupling and improve development efficiency, the system is often split into a plurality of subsystems, a layered structure is adopted for design, and complex dependency relationships exist among different levels of services.
Currently, as shown in fig. 1, the Software Platform architecture includes an Infrastructure as a Service (IaaS) layer, a Platform as a Service (PaaS) layer, and a Software as a Service (SaaS) layer, where the IaaS layer refers to providing an IT Infrastructure such as Software, hardware, and a network as a Service through a network; the PaaS layer refers to a platform, namely a service, provides a server platform as a service and can provide a service for inquiring and accessing real-time data; the SaaS layer refers to software as a service, and provides software services through a network, and the PaaS layer is also an application of the SaaS layer.
The database system as a PaaS layer receives and processes a large number of requests sent by SaaS layer applications all the time, and when the query rate per second (QPS) in the database system is too high, that is, the flow processed by the query server within a specified time is too high or the request parameters are not reasonable, the problems of service suspension, database downtime, slow query response, too high system load and the like of the database system can be caused.
Further, to avoid the above problems, a fuse degradation protection method is usually adopted, and the core of the fuse degradation protection method is to preferentially ensure core services and to preferentially ensure the use of most users for the database system, and when the resource utilization rate of a certain interface is about to reach an upper limit or a fault occurs, the use of the interface is directly stopped, so as to achieve the purpose of reducing the resource utilization rate and ensuring that most interfaces can be normally used.
The existing fusing degradation protection method depends on the existence of an Elasticissearch mechanism when hardware resource information is collected, the Elasticissearch is a distributed, high-expansion and high-real-time search and data analysis engine, the hardware resource information is inquired through the Elasticissearch mechanism, a database system determines the load condition of the system according to the inquired hardware resource information, and fusing degradation protection measures are taken when the load of the system is too high.
Disclosure of Invention
The application provides a fusing degradation protection method and device for a database and electronic equipment, and the fusing degradation protection method and device are used for performing fusing degradation protection on various interfaces of different levels when the utilization rate of server cluster resources exceeds a preset resource utilization rate threshold value.
In a first aspect, the present application provides a method for protecting a database from fusing degradation, where the method is applied to a database system, and a service of the database system runs in at least one server cluster, and the method includes:
acquiring a first resource utilization rate of a current server cluster, wherein the first resource utilization rate represents the utilization rate of hardware resources in the current server cluster;
determining whether the first resource usage is greater than a resource usage threshold;
if so, acquiring the priority of each interface corresponding to the current server cluster, and closing each interface with a first priority, wherein the first priority is the lowest priority;
if not, maintaining the normal use of each interface corresponding to the current server cluster.
By the method, when the utilization rate of the server cluster resources exceeds a preset resource utilization rate threshold value, the fusing degradation protection can be timely performed on each interface with the first priority, fusing degradation is performed according to different priorities of each interface in the database system, and full utilization of database resources can be guaranteed to the greatest extent.
In one possible design, before obtaining the first resource usage of the current server cluster, the method further includes:
acquiring K hardware resources in the current server cluster, and calculating the utilization rate of the K hardware resources, wherein K is an integer greater than or equal to 1;
screening J hardware resources with the hardware resource utilization rate larger than a hardware resource utilization rate threshold value, wherein J is less than or equal to K;
and taking the ratio of the J hardware resources to the total number of the hardware resources in the current server cluster as a first resource utilization rate.
By the method, the utilization rate of the hardware resources in the current server cluster can be acquired in real time, when the hardware resources with the hardware resource utilization rate larger than the hardware resource utilization rate threshold value are screened out, the first resource utilization rate of the current server cluster can be calculated, and whether fusing degradation is performed on each interface of different levels in the database system can be further judged.
In one possible design, after shutting down the interfaces of the first priority, the method further includes:
acquiring a second resource utilization rate of the current server cluster;
determining whether the second resource usage is greater than the resource usage threshold;
if yes, closing each interface of a second priority corresponding to the current server cluster, wherein the second priority is higher than the first priority;
if not, keeping each interface of the first priority closed.
By the method, after the first fusing degradation is executed, the second resource utilization rate of the current server cluster is continuously obtained, whether the second fusing degradation is executed or not can be further judged, and the method can ensure that all parts of resources in the server cluster can be utilized to the maximum extent and core services in a database are not influenced.
In one possible design, after shutting down the interfaces of the first priority, the method further includes:
acquiring first stable time after each interface with a first priority is closed, wherein the first stable time is the duration of time that the first resource utilization rate is lower than the resource utilization rate threshold;
determining whether the first stabilization is for a time exceeding a preset stabilization time threshold;
if yes, recovering the use of each interface of the first priority;
if not, keeping each interface of the first priority closed.
By the method, when the first resource utilization rate of the current server cluster is lower than the resource utilization rate threshold, whether the use of each interface of the first priority can be recovered or not is judged by acquiring the stabilization time of the current server cluster, so that the core service processing can be ensured not to be influenced, and the use of each closed interface can be automatically recovered when the resource utilization rate is lower than the resource utilization rate threshold and is kept stable.
In a second aspect, the present application provides a fuse degradation protection apparatus for a database, the apparatus comprising:
the acquisition module is used for acquiring the resource utilization rate of the current server cluster and the hardware resource utilization rate of hardware resources in the current server cluster;
and the processing module is used for judging whether the resource utilization rate of the current server cluster exceeds a preset resource utilization rate threshold value.
In a possible design, the obtaining module is specifically configured to obtain a utilization rate of hardware resources in a current server cluster, and obtain the resource utilization rate of the current server cluster according to a number of the hardware resources in the current server cluster, where the hardware resource utilization rate is greater than a threshold of the hardware resource utilization rate, and a total number of the hardware resources in the current server cluster.
In a possible design, the processing module is specifically configured to determine whether a first resource usage rate of the current server cluster is greater than a preset resource usage rate threshold;
if the first resource utilization rate of the current server cluster is greater than a preset resource utilization rate threshold value, acquiring the priority of each interface corresponding to the current server cluster, and closing each interface with the first priority;
and if the first resource utilization rate of the current server cluster is smaller than a preset resource utilization rate threshold value, maintaining the normal use of each interface corresponding to the current server cluster.
In one possible design, the apparatus further includes:
and the timing module is used for timing the duration when the resource utilization rate of the current server cluster is smaller than a preset resource utilization rate threshold value.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the fusing degradation protection method of the database when executing the computer program stored in the memory.
In a fourth aspect, the present application provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the fusing degradation protection method for a database described above.
For each of the second to fourth aspects and possible technical effects of each aspect, please refer to the above description of the possible technical effects for each of the first and the second aspects, and no repeated description is given here.
Drawings
Fig. 1 is a schematic diagram of a software platform architecture according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for protecting a database from fusing degradation according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a fuse degradation protection apparatus for a database according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, the present application will be further described in detail with reference to the accompanying drawings. The particular methods of operation in the method embodiments may also be applied to apparatus embodiments or system embodiments. It should be noted that "a plurality" is understood as "at least two" in the description of the present application. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. A is connected with B and can represent: a and B are directly connected and A and B are connected through C. In addition, in the description of the present application, the terms "first," "second," and the like are used for descriptive purposes only and are not intended to indicate or imply relative importance nor order to be construed.
Embodiments of the present application are described in detail below with reference to the accompanying drawings.
Firstly, a database system serving as a PaaS layer is connected and interacted with SaaS layer application through a query service layer, and the database system can receive an access request after the access request sent by the SaaS layer application passes through the query service layer; the database system comprises interfaces with different functions provided by a data query service, services such as the data query service and a resource monitoring service exist in the database system, the data query service mainly provides the data query service in the database system, and the resource monitoring service mainly provides the service for monitoring hardware resources in the server cluster. The services may be deployed in a server cluster composed of a plurality of servers, and the services in the database system may be deployed in one server cluster or may be deployed in a plurality of server clusters.
When the resource utilization rate of the server cluster increases sharply, the database system can directly stop the use of the interface when the resource utilization rate of a certain interface is about to reach the upper limit or has a fault according to the current service condition and the flow condition, so that the purposes of reducing the resource utilization rate and ensuring the core service and normal use of most interfaces are achieved.
In view of the above, the embodiment of the present application provides a method for protecting fusing degradation of a database, which is mainly used in an external access layer of the database, that is, a data query service, where the database serves as a PaaS layer, provides a real-time data query access service, receives and processes a large number of requests sent by SaaS layer applications at any time, and determines whether a first resource usage rate of a current server cluster is greater than a resource usage rate threshold by obtaining the first resource usage rate when the query service is started; if so, acquiring the priority of each interface corresponding to the current server cluster, closing each interface of the first priority, and if not, maintaining the normal use of each interface corresponding to the current server cluster.
Referring to fig. 2, a method for protecting fusing degradation of a database provided by the present application is implemented as follows:
s11, acquiring a first resource utilization rate of the current server cluster;
firstly, when a database system starts a query service, a resource monitoring module is opened at the same time, after the resource monitoring module is opened, the resource monitoring module acquires hardware resource information in a current server cluster from a prometheus component, and then calculates the actual utilization rate of the hardware resource according to the acquired hardware resource information, in the embodiment of the application, the hardware resource can be a CPU and an input/output device (IO), so that the actual utilization rates of the CPU and the IO can be calculated, and the hardware resource can generate different hardware resource utilization rates according to different service requirements and different use conditions; for example, when the traffic processed by the database system in a predetermined time is too high, the usage rate of the hardware resources is too high, and when the traffic processed by the database system is relatively low, the usage rate of the hardware resources is also relatively low.
Further, in this embodiment of the present application, the actual usage rate of the hardware resource may be obtained according to a resource statistics core calculation formula of the prometheus component, where the specific calculation formula is as follows:
CPU utilization:
1-avg(rate(node_cpu_seconds_total{mode="idle"}[60s]))by(instance);
IO utilization rate:
max by(instance)(avg(irate(node_disk_io_time_seconds_total[60s]))by(instance,device));
specifically, after the resource monitoring module is started, after the resource monitoring module acquires each hardware resource from the promemeus component, the usage rate of each CPU and input/output devices (IO) can be calculated through the above calculation formula, and the promemeus component calculates the usage of the hardware resource in the current server cluster once every fixed time interval, for example, if the fixed time interval is set to 1 minute, the promemeus component calculates the usage of the hardware resource in the current server cluster once every 1 minute interval.
For example, after 10 hardware resources exist in the current server cluster and the hardware resource information is obtained from the promemeus component, the actual usage rates of 10 CPUs and input/output devices (IO) existing in the current server cluster are calculated by the above formula, and further, the actual usage rates of the CPUs and the input/output devices (IO) in the current server cluster are calculated again every 1 minute, so that the real-time usage rate of each hardware resource is obtained.
Specifically, the calculated hardware resource utilization rate at this time may be greater than or less than the hardware resource utilization rate threshold.
Further, screening out the hardware resources of which the hardware resource utilization rate is greater than a hardware resource utilization rate threshold value in the current server cluster.
Firstly, in order to screen out the hardware resources with the hardware resource usage rate greater than the hardware resource usage rate threshold, the usage rate threshold needs to be determined first.
In an optional manner, the threshold of the hardware resource usage rate may be set to 80%, the usage rates corresponding to the K hardware resources are obtained through calculation according to a promemeus component resource statistics core calculation formula, after the usage rate of each hardware resource in the server cluster is obtained, the usage rate of the corresponding hardware resource is compared with the threshold of the hardware resource usage rate, at this time, two results are obtained, one is that the hardware resource usage rate is greater than the threshold of the hardware resource usage rate, and the other is that the hardware resource usage rate is smaller than the threshold of the hardware resource usage rate.
After the comparison result is obtained, J hardware resources whose hardware resource utilization rates are greater than the hardware resource utilization rate threshold are screened out, for example, through calculation of a prometheus component, if the actual utilization rate of the hardware resource a is 85% greater than the hardware resource utilization rate threshold, at this time, the hardware resource a is screened out and counted in the number, and if the actual utilization rate of the hardware resource B is 70% less than the hardware resource utilization rate threshold, the hardware resource B is not counted in the number.
Further, after the utilization rates of all hardware resources in the current server cluster are calculated, the hardware resources exceeding the threshold of the utilization rates of the hardware resources are screened out, for example, if 5 hardware resources exceeding the threshold of the utilization rates of the hardware resources are obtained through calculation, the 5 hardware resources exceeding the threshold of the utilization rates of the hardware resources are counted in the number.
After J hardware resources with the hardware resource utilization rate larger than the hardware resource utilization rate threshold value are screened out, the total number of the hardware resources in the current server cluster is obtained, and the ratio of the J hardware resources to the total number of the hardware resources in the current server cluster is used as a first resource utilization rate.
After the first resource utilization rate of the current server cluster is obtained, whether fusing degradation protection is executed or not can be further selected, so that most interface resources in the database system can be ensured to run normally, and the main interface functions can be ensured to be used normally.
S12, judging whether the first resource utilization rate is greater than a resource utilization rate threshold value or not;
first, in order to determine whether the resource usage is greater than the resource usage threshold, the resource usage threshold needs to be determined.
In an alternative manner, the resource usage threshold may be set to 20%; if the first resource utilization of the current server cluster is greater than the resource utilization threshold, for example, if the first resource utilization of the current server cluster is 23% greater than the resource utilization threshold 20%, step S13 is executed, and if the first resource utilization of the current server cluster is less than the resource utilization threshold, for example, if the first resource utilization of the current server cluster is 18% less than the resource utilization threshold, step S14 is executed.
S13, acquiring the priority of each interface corresponding to the current server cluster, and closing each interface with the first priority;
after the result that the first resource utilization rate of the current server cluster is greater than the resource utilization rate threshold is obtained, the priority of each interface corresponding to the current server cluster is further obtained.
In an alternative embodiment, the interface level may be divided into 5 levels, level 1: advanced query, namely, related form I, but a large number of forms are involved, the use frequency is high, and the resource consumption is low; grade 2: the universal SQL and the transparent transmission SQL have the most frequent and extensive interfaces used outside and have larger resource consumption; grade 3: the fusion retrieval relates to large data volume, the association query of a parent-child table is high in use frequency and large in resource consumption; grade 4: the vehicle and portrait technology battle law relates to the large data volume multi-table correlation query, and has high use frequency and large resource consumption; grade 5: secondary warehousing, rolling query and batch marking relate to large-data-volume query and batch warehousing, and the resource consumption is very large. As shown in table 1:
grade of Interface
1 Advanced queries (all interfaces except for levels 2, 3, 4, 5)
2 General SQL and transparent transmission SQL
3 Fusion search
4 Vehicle and portrait technique and battle method
5 Secondary warehousing, rolling query and batch marking
Table 1;
after the priorities of the interfaces corresponding to the current server cluster are obtained, the priorities here represent the sequence of closing the interfaces, and further close the interfaces with the first priority, at this time, the use of the interface with the level 5 is stopped, and after the first fusing degradation is executed, the access of the interface with the level 5 is stopped, so that the calling of the interface query request is limited, and the purpose of reducing the utilization rate of hardware resources is further achieved.
In an alternative embodiment, after shutting down the respective interface of the first priority;
acquiring a second resource utilization rate of the current server cluster;
determining whether the second resource usage is greater than a resource usage threshold;
if the second resource utilization rate is greater than the resource utilization rate threshold, closing each interface of a second priority corresponding to the current server cluster, wherein the second priority is higher than the first priority; for example, after the interfaces of the first priority are closed, the obtained second resource usage rate is 25%, and at this time, the second resource usage rate is greater than the resource usage rate threshold, then the interfaces of the second priority are closed.
If the second resource utilization rate is less than the resource utilization rate threshold, closing each interface of the first priority corresponding to the current server cluster is maintained, for example, after each interface of the first priority is closed, the obtained second resource utilization rate is 15%, at this time, the second resource utilization rate is less than the preset resource utilization rate threshold, further, the resource monitoring module continuously monitors the hardware resource, and maintains closing each interface of the first priority, and if the obtained second resource utilization rate is 25%, at this time, the second resource utilization rate is greater than the preset resource utilization rate threshold, further, the interfaces of each level of the second priority are closed.
After each interface with the first priority is closed by executing the first fusing degradation, whether the second fusing degradation is executed is judged according to the obtained second resource utilization rate, the classification of the interface grades is realized, the interfaces are closed step by step according to different priorities, most services in a database system can be ensured to run normally, and the utilization rate of the database resources is improved.
In an alternative embodiment, after shutting down the respective interface of the first priority;
acquiring first stable time after each interface of the first priority is closed, wherein the first stable time is the duration time that the first resource utilization rate of the current server cluster is lower than a preset resource utilization rate threshold value;
after the first stable time is obtained, further judging whether the first stable time exceeds a preset stable time threshold value;
in an alternative embodiment, the settling time threshold may be set to 10 minutes, and after triggering the fusing degradation to close each interface of the first priority, if the acquired first settling time exceeds a preset settling time threshold, the use of each interface of the first priority is resumed.
For example, if the acquired stabilization time after the first fusing degradation is triggered is 15 minutes, further, it is determined that the first stabilization time exceeds a stabilization time threshold, at this time, the utilization rate of the server cluster resources is decreased and is relatively stable, and the database system recovers the use of each interface of the first priority.
In the embodiment of the application, different interfaces are divided into 5 levels, hardware resources are obtained through a promemeus component in the process of executing fusing degradation, the utilization rate of the hardware resources is calculated, the fusing degradation is automatically executed according to the priority of the interfaces when the fusing degradation condition is met, the fusing degradation is preferentially executed on each interface of the level 5 when the fusing degradation is executed, the fusing degradation is executed on each interface of the level 4, and the like, the fusing degradation is stopped when the resource utilization rate is lower than the utilization rate threshold, otherwise, the fusing degradation is stopped until the degradation reaches the level 1; and when the utilization rate of the server cluster resources is reduced, the use of all the interfaces at the levels can be recovered, so that the problem of shortage of database resources is solved, and the core service can be ensured not to be influenced.
And S14, maintaining the normal use of each interface corresponding to the current server cluster.
After acquiring the hardware resource information in the current server cluster, calculating that the utilization rate of the hardware resource is smaller than a utilization rate threshold, for example, the utilization rate of the hardware resource is 70% and is smaller than a preset utilization rate threshold 80%, or the resource utilization rate of the current server cluster is smaller than a preset resource utilization rate threshold, for example, the calculated utilization rate of the current server cluster resource is 15% and is smaller than a preset resource utilization rate threshold 20%, and further, if the condition for executing fusing degradation is not met, not executing fusing degradation; at this time, the resource monitoring module will continue to monitor the hardware resources in the current server cluster and maintain the normal use of each interface corresponding to the current server cluster.
Based on the method, when the resource utilization rate of the current server cluster is greater than the preset resource utilization rate threshold, the interfaces of each priority can be closed step by step according to the difference of the interface priorities so as to achieve the purposes of reducing the resource utilization rate and ensuring that the core service in the database is not influenced, and when the pressure of the current server cluster is reduced and the resource utilization rate of the server cluster is lower than the preset resource utilization rate threshold, the closed interfaces of each level can be automatically recovered, so that the maximization of the utilization of all parts of resources in the database system is realized.
Based on the same inventive concept, an embodiment of the present application further provides a fusing degradation protection device for a database, and as shown in fig. 3, the device includes:
an obtaining module 301, configured to obtain a resource utilization rate of a current server cluster and a hardware resource utilization rate of a hardware resource in the current server cluster;
a processing module 302, configured to determine whether a resource utilization of a current server cluster exceeds a preset resource utilization threshold;
in one possible design, the obtaining module is specifically configured to obtain a hardware resource usage rate in the current server cluster, and obtain the resource usage rate of the current server cluster according to the total number of the hardware resources in the current server cluster and the hardware resources whose hardware resource usage rate is greater than the threshold of the hardware resource usage rate.
In one possible design, the processing module is specifically configured to determine whether a first resource usage rate of the current server cluster is greater than a preset resource usage rate threshold;
if the first resource utilization rate of the current server cluster is greater than a preset resource utilization rate threshold value, acquiring the priority of each interface corresponding to the current server cluster, and closing each interface with the first priority;
and if the first resource utilization rate of the current server cluster is smaller than a preset resource utilization rate threshold value, maintaining the normal use of each interface corresponding to the current server cluster.
Based on the same inventive concept, an embodiment of the present application further provides an electronic device, where the electronic device may implement a function of the fusing degradation protection method for a database, and with reference to fig. 4, the electronic device includes:
at least one processor 401 and a memory 402 connected to the at least one processor 401, in this embodiment, a specific connection medium between the processor 401 and the memory 402 is not limited in this application, and fig. 3 illustrates an example in which the processor 401 and the memory 402 are connected by a bus 400. The bus 400 is shown in fig. 4 by a thick line, and the connection manner between other components is merely illustrative and not limited thereto. The bus 400 may be divided into an address bus, a data bus, a control bus, etc., and is shown with only one thick line in fig. 4 for ease of illustration, but does not represent only one bus or type of bus. Alternatively, processor 401 may also be referred to as a controller, without limitation to name a few.
In the embodiment of the present application, the memory 402 stores instructions executable by the at least one processor 401, and the at least one processor 401 may execute the fusing degradation protection method for a database discussed above by executing the instructions stored in the memory 402. The processor 401 may implement the functions of the various modules in the apparatus shown in fig. 3.
The processor 401 is a control center of the apparatus, and may connect various parts of the entire control device by using various interfaces and lines, and perform various functions and process data of the apparatus by operating or executing instructions stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the apparatus.
In one possible design, processor 401 may include one or more processing units and processor 401 may integrate an application processor that handles primarily operating systems, user interfaces, application programs, and the like, and a modem processor that handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401. In some embodiments, processor 401 and memory 402 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 401 may be a general-purpose processor, such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like, that may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the fusing degradation protection method for a database disclosed in the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
The memory 402, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 402 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory 402 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 402 in the embodiments of the present application may also be circuitry or any other device capable of performing a storage function for storing program instructions and/or data.
By programming the processor 401, the code corresponding to the fusing degradation protection method for the database described in the foregoing embodiment may be solidified into a chip, so that the chip can execute the steps of the fusing degradation protection method for the database of the embodiment shown in fig. 2 when running. How to program the processor 401 is well known to those skilled in the art and will not be described in detail herein.
Based on the same inventive concept, the present application further provides a storage medium storing computer instructions, which when executed on a computer, cause the computer to perform the fusing degradation protection method for a database discussed above.
In some possible embodiments, the aspects of the method for protecting against fusing degradation of a database provided by the present application may also be implemented in the form of a program product including program code for causing the control apparatus to perform the steps of the method for protecting against fusing degradation of a database according to various exemplary embodiments of the present application described above in this specification when the program product is run on a device.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
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.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A method for protecting a database from fusing degradation, wherein the method is applied to a database system, and services of the database system run in at least one server cluster, and the method comprises the following steps:
acquiring a first resource utilization rate of a current server cluster, wherein the first resource utilization rate represents the utilization rate of hardware resources in the current server cluster;
determining whether the first resource usage is greater than a resource usage threshold;
if so, acquiring the priority of each interface corresponding to the current server cluster, and closing each interface with a first priority, wherein the first priority is the lowest priority;
if not, maintaining the normal use of each interface corresponding to the current server cluster.
2. The method of claim 1, wherein prior to said obtaining the first resource usage of the current server cluster, the method further comprises:
acquiring K hardware resources in the current server cluster, and calculating the utilization rate of the K hardware resources, wherein K is an integer greater than or equal to 1;
screening J hardware resources with the hardware resource utilization rate larger than a hardware resource utilization rate threshold value, wherein J is less than or equal to K;
and taking the ratio of the J hardware resources to the total number of the hardware resources in the current server cluster as a first resource utilization rate.
3. The method of claim 1, wherein after said shutting down each interface of the first priority, the method further comprises:
acquiring a second resource utilization rate of the current server cluster;
determining whether the second resource usage is greater than the resource usage threshold;
if so, closing each interface of a second priority corresponding to the current server cluster, wherein the second priority is higher than the first priority;
if not, keeping each interface of the first priority closed.
4. The method of claim 1, wherein after said shutting down each interface of the first priority, the method further comprises:
obtaining a first stable time after each interface with a first priority is closed, wherein the first stable time is the duration of time that the first resource utilization rate is lower than the resource utilization rate threshold;
judging whether the first stabilization time exceeds a preset stabilization time threshold value;
if yes, recovering the use of each interface of the first priority;
if not, keeping each interface of the first priority closed.
5. A fuse degradation protection apparatus for a database, the apparatus comprising:
the acquisition module is used for acquiring the resource utilization rate of the current server cluster and the hardware resource utilization rate of hardware resources in the current server cluster;
and the processing module is used for judging whether the resource utilization rate of the current server cluster exceeds a preset resource utilization rate threshold value.
6. The apparatus according to claim 5, wherein the obtaining module is specifically configured to obtain a utilization rate of hardware resources in the current server cluster, and obtain the resource utilization rate of the current server cluster according to a total number of hardware resources in the current server cluster and hardware resources whose hardware resource utilization rates are greater than a hardware resource utilization rate threshold.
7. The apparatus of claim 5, wherein the processing module is specifically configured to determine whether a first resource usage of the current server cluster is greater than a preset resource usage threshold;
if the first resource utilization rate of the current server cluster is greater than a preset resource utilization rate threshold value, acquiring the priority of each interface corresponding to the current server cluster, and closing each interface with the first priority;
and if the first resource utilization rate of the current server cluster is smaller than a preset resource utilization rate threshold value, maintaining the normal use of each interface corresponding to the current server cluster.
8. The apparatus of claim 5, wherein the apparatus further comprises:
and the timing module is used for timing the duration when the resource utilization rate of the current server cluster is smaller than a preset resource utilization rate threshold value.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1-4 when executing the computer program stored on the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1-4.
CN202211225385.2A 2022-10-09 2022-10-09 Fusing degradation protection method and device for database and electronic equipment Pending CN115617553A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211225385.2A CN115617553A (en) 2022-10-09 2022-10-09 Fusing degradation protection method and device for database and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211225385.2A CN115617553A (en) 2022-10-09 2022-10-09 Fusing degradation protection method and device for database and electronic equipment

Publications (1)

Publication Number Publication Date
CN115617553A true CN115617553A (en) 2023-01-17

Family

ID=84860376

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211225385.2A Pending CN115617553A (en) 2022-10-09 2022-10-09 Fusing degradation protection method and device for database and electronic equipment

Country Status (1)

Country Link
CN (1) CN115617553A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116630034A (en) * 2023-07-21 2023-08-22 杭银消费金融股份有限公司 Wind control data processing system and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116630034A (en) * 2023-07-21 2023-08-22 杭银消费金融股份有限公司 Wind control data processing system and method
CN116630034B (en) * 2023-07-21 2023-11-07 杭银消费金融股份有限公司 Wind control data processing system and method

Similar Documents

Publication Publication Date Title
CN110166282B (en) Resource allocation method, device, computer equipment and storage medium
CN111427844B (en) Data migration system and method for file hierarchical storage
CN111522636A (en) Application container adjusting method, application container adjusting system, computer readable medium and terminal device
CN110289994B (en) Cluster capacity adjusting method and device
US20100162251A1 (en) System, method, and computer-readable medium for classifying problem queries to reduce exception processing
CN109981702B (en) File storage method and system
US20180107590A1 (en) Information processing apparatus
CN104504147A (en) Resource coordination method, device and system for database cluster
CN112751726A (en) Data processing method and device, electronic equipment and storage medium
CN114490527B (en) Metadata retrieval method, system, terminal and storage medium
CN115617553A (en) Fusing degradation protection method and device for database and electronic equipment
CN111651595A (en) Abnormal log processing method and device
CN115033340A (en) Host selection method and related device
CN116578408A (en) Operation resource scheduling method for supporting intelligent manufacturing software
CN117744129B (en) Intelligent operation and maintenance method and system based on CIM
CN117493063A (en) Memory management method and device and electronic equipment
CN110222016B (en) File processing method and device
CN105989152A (en) Search engine service quality monitoring methods, apparatus and system
CN115269519A (en) Log detection method and device and electronic equipment
CN115499513A (en) Data request processing method and device, computer equipment and storage medium
CN115934311A (en) Data redistribution method and electronic equipment
WO2020140623A1 (en) Electronic device, metadata processing method and computer readable storage medium
CN114201363A (en) System protection method, device, equipment and storage medium
CN107623577B (en) Service call flow control method and device
CN116431327B (en) Task current limiting processing method and fort machine

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