Distributed database management method, device, electronic device and medium

By monitoring the status of distributed database nodes, generating backup containers and assigning tasks, the automatic recovery problem in case of failure of distributed database nodes is solved, automatic failover and resource scheduling are realized, and operation and maintenance pressure is reduced.

CN111782441BActive Publication Date: 2024-11-19INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010638070.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-03
Publication Date
2024-11-19
Estimated Expiration
2040-07-03

AI Technical Summary

Technical Problem

When a distributed database node fails, automatic recovery cannot be achieved, resulting in cumbersome operation and maintenance and manual intervention is required.

Method used

Listen to the working container status in the distributed database, generate backup containers, and assign tasks of abnormal working containers to the backup containers, realizing automatic fault transfer and resource elastic scheduling.

Benefits of technology

Automatic failover and resource scheduling of distributed databases are realized, manual intervention is reduced, operation and maintenance efficiency is improved, and operation and maintenance pressure is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111782441B_ABST
    Figure CN111782441B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for managing a distributed database, including: monitoring the working status of each working container in the distributed database; in response to monitoring that an abnormality occurs in a working container in the distributed database, obtaining configuration parameters of the abnormal working container; generating a spare container based on the configuration parameters; and allocating at least part of the working tasks of the abnormal working container to the spare container. The present disclosure also provides a management device for a distributed database, an electronic device, and a computer-readable medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and more specifically, to a distributed database management method, a distributed database management device, an electronic device, and a computer-readable medium. Background Art

[0002] In many fields such as the Internet, finance, and telecommunications, as business continues to grow, the IT environment of enterprises is also evolving. A single database can no longer meet the needs of storing massive amounts of data and accessing data with high concurrency. Distributed databases have emerged as the times require, and they can effectively solve the problems of storing massive amounts of data and accessing data with high concurrency.

[0003] However, in the process of implementing the concept of the present invention, the inventors found that there are at least the following problems in the related art: when a distributed database node fails, manual intervention is usually required, the node cannot be automatically restored, and the operation and maintenance is cumbersome. Summary of the invention

[0004] In view of this, in order to solve the problem that a distributed database container cannot be automatically scheduled and restored when an exception occurs, the present disclosure provides a distributed database management method, a distributed database management device, an electronic device and a computer-readable medium.

[0005] One aspect of the present disclosure provides a method for managing a distributed database, including: monitoring the working status of each working container in the distributed database, in response to monitoring an abnormality in a working container in the distributed database, obtaining configuration parameters of the abnormal working container, generating a spare container based on the configuration parameters, and allocating at least part of the work tasks of the abnormal working container to the spare container.

[0006] According to an embodiment of the present disclosure, the abnormality of the working container includes: a failure of the working container, or an operation index of the working container exceeds a preset threshold.

[0007] According to an embodiment of the present disclosure, allocating at least part of the work tasks of the abnormal working container to the spare container includes: when the working container fails, allocating all the work tasks of the working container to the spare container.

[0008] According to an embodiment of the present disclosure, allocating at least part of the work tasks of the abnormal working container to the spare container includes: when the operating index of the working container exceeds a preset threshold, allocating part of the work tasks of the working container to the spare container.

[0009] According to an embodiment of the present disclosure, the method further includes: in response to monitoring that the abnormal working container has returned to normal, allocating the work tasks of the backup container to the working container that has returned to normal, and releasing the resources occupied by the backup container.

[0010] According to an embodiment of the present disclosure, the method also includes: receiving configuration information from a user, and generating a distributed database corresponding to the user based on the configuration information, wherein the distributed database includes at least one container, and the at least one container includes at least one of a computing container, a storage container, and a management container.

[0011] Another aspect of the present disclosure provides a management device for a distributed database, the management device comprising a monitoring module, an acquisition module, a first generation module and a first allocation module. The monitoring module is used to monitor the working status of each working container in the distributed database. The acquisition module is used to obtain the configuration parameters of the abnormal working container in response to monitoring that an abnormality occurs in the working container in the distributed database. The first generation module is used to generate a spare container based on the configuration parameters. The first allocation module is used to allocate at least part of the work tasks of the abnormal working container to the spare container.

[0012] According to an embodiment of the present disclosure, the abnormality of the working container includes: a failure of the working container, or an operation index of the working container exceeds a preset threshold.

[0013] According to an embodiment of the present disclosure, allocating at least part of the work tasks of the abnormal working container to the spare container includes: when the working container fails, allocating all the work tasks of the working container to the spare container.

[0014] According to an embodiment of the present disclosure, allocating at least part of the work tasks of the abnormal working container to the spare container includes: when the operating index of the working container exceeds a preset threshold, allocating part of the work tasks of the working container to the spare container.

[0015] According to an embodiment of the present disclosure, the device further includes a second allocation module and a release module. The second allocation module is used to allocate the work tasks of the standby container to the working container that has returned to normal in response to monitoring that the abnormal working container has returned to normal. The release module is used to release the resources occupied by the standby container.

[0016] According to an embodiment of the present disclosure, the device further includes a receiving module and a second generating module. The receiving module is used to receive configuration information from a user. The second generating module is used to generate a distributed database corresponding to the user based on the configuration information, wherein the distributed database includes at least one container, and the at least one container includes at least one of a computing container, a storage container, and a management container.

[0017] Another aspect of the present disclosure provides an electronic device, including: one or more processors, and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.

[0018] Another aspect of the present disclosure provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method described above.

[0019] Another aspect of the present disclosure provides a computer program, which includes computer executable instructions, and the instructions are used to implement the method described above when executed.

[0020] The disclosed embodiment uses backup resources to generate a backup container that matches the abnormal working container to share the work tasks of the abnormal working container, thereby achieving the purpose of automatic fault transfer and elastic scheduling of resources, providing users with imperceptible operation and maintenance services, reducing manual intervention, and alleviating the pressure on operation and maintenance personnel. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0022] Figure 1 An example of an architecture to which a distributed database management method according to an embodiment of the present disclosure can be applied is schematically shown;

[0023] Figure 2 A flowchart schematically illustrates a method for managing a distributed database according to an embodiment of the present disclosure;

[0024] Figure 3 A block diagram schematically shows a distributed database management device according to an embodiment of the present disclosure; and

[0025] Figure 4 A block diagram of an electronic device according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0026] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0027] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The words "a", "an (kind)" and "the" used herein should also include the meanings of "multiple" and "multiple", unless the context clearly indicates otherwise. In addition, the terms "including", "comprising" and the like used herein indicate the presence of the features, steps, operations and / or components, but do not exclude the presence or addition of one or more other features, steps, operations or components.

[0028] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0029] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but not be limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but not be limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). Those skilled in the art should also understand that any transitional conjunctions and / or phrases that substantially indicate two or more optional items, whether in the specification, claims, or drawings, should be understood to give the possibility of including one of these items, either of these items, or both of these items. For example, the phrase "A or B" should be understood to include the possibilities of "A" or "B", or "A and B".

[0030] The embodiments of the present disclosure provide a method and device for managing a distributed database. The method includes: monitoring the working status of each working container in the distributed database, and in response to monitoring that an abnormality occurs in a working container in the distributed database, obtaining configuration parameters of the abnormal working container. Then, based on the configuration parameters, a spare container is generated, and at least part of the working tasks of the abnormal working container are allocated to the spare container.

[0031] Figure 1 The schematic diagram shows an architecture example 100 to which a distributed database management method according to an embodiment of the present disclosure can be applied.

[0032] It should be noted that Figure 1 What is shown is merely an architectural example of a distributed database management method to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0033] like Figure 1 As shown, the application scenario 100 according to this embodiment may include distributed database clusters 111 , 112 , a distributed database cluster manager 120 and a cloud platform management program 130 .

[0034] According to the embodiment of the present disclosure, the distributed database clusters 111 and 112 may include a computing module, a management module, and a storage module. The computing module is stateless and is responsible for receiving SQL requests from the application side, processing SQL-related logic, interacting with the storage module to obtain data, and finally returning results to the application side. The management module is stateless and is responsible for managing the information of the entire database cluster. The storage module is stateful and is responsible for storing the data of the entire database cluster.

[0035] In the embodiment of the present disclosure, the computing module, the management module and the storage module can be packaged into containers in proportion according to the needs of different databases. For example, the distributed database cluster 111 includes three storage containers, two computing containers and one management container. The distributed database cluster 112 includes two storage containers, two computing containers and two management containers. It can be understood that the embodiment of the present disclosure does not limit the ratio between the storage containers, computing containers and management containers in each distributed database cluster, nor does it limit the resources occupied by each container (for example, the storage space occupied by the storage container in the distributed database cluster 111 can be larger than the storage space occupied by the storage container in the distributed database cluster 112, or the storage space occupied by the storage container 1 in the distributed database cluster 111 can be larger than the storage space occupied by the storage container 2 in the distributed database cluster 111). Those skilled in the art can set the container ratio in each distributed database cluster and the resources occupied by each container according to actual needs.

[0036] In the embodiment of the present disclosure, a stateful module (eg, a storage container) needs to be persistently stored.

[0037] According to the embodiment of the present disclosure, since different database scheduling logics are different, the scheduling of a single or multiple distributed database clusters can be managed by the distributed database cluster manager 120. For example, the distributed database cluster manager 120 can be controlled by the cloud platform management program 130 to manage the scheduling of a single or multiple distributed database clusters.

[0038] It should be noted that the distributed database management method provided in the embodiment of the present disclosure can generally be executed by the distributed database cluster manager 120. Accordingly, the distributed database management device provided in the embodiment of the present disclosure can generally be set in the distributed database cluster manager 120. The distributed database management method provided in the embodiment of the present disclosure can be executed by a server or server cluster that is different from the distributed database cluster manager 120 and can communicate with the distributed database clusters 111, 112 and / or the distributed database cluster manager 120. Accordingly, the distributed database management device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the distributed database cluster manager 120 and can communicate with the distributed database clusters 111, 112 and / or the distributed database cluster manager 120.

[0039] For example, the distributed database cluster manager 120 can monitor the working status of each working container in the distributed database 111 and / or 112, and in response to monitoring that an abnormality occurs in a working container in the distributed database, obtain the configuration parameters of the abnormal working container. Then, based on the configuration parameters, a spare container matching the abnormal working container can be generated using spare resources, so that at least part of the work tasks of the abnormal working container can be allocated to the spare container.

[0040] It should be understood that Figure 1 The number of distributed database clusters, distributed database cluster managers, and cloud platform management programs in the embodiment is only illustrative. According to the implementation requirements, there can be any number of distributed database clusters, distributed database cluster managers, and cloud platform management programs.

[0041] Figure 2 The flowchart of the distributed database management method according to the embodiment of the present disclosure is schematically shown.

[0042] like Figure 2 As shown, the method includes operations S201 to S204.

[0043] In operation S201, the working status of each working container in the distributed database is monitored.

[0044] According to an embodiment of the present disclosure, a distributed database may include multiple work containers, and each work container undertakes a certain work task.

[0045] For example, a distributed database may include multiple server nodes, and each server node may be provided with one or more working containers.

[0046] In the embodiment of the present disclosure, the working container may include, for example, a computing container, a storage container, and a management container.

[0047] For example, computing resources in a distributed database can be packaged into one or more computing containers. The computing container can be used to perform tasks such as receiving SQL requests from the application side, processing SQL-related logic, interacting with the storage module to obtain data, and finally returning results to the application side.

[0048] For another example, management resources in a distributed database may be packaged into one or more management containers, which may be used to perform tasks such as managing information of the entire database.

[0049] For another example, the storage resources in the distributed database may be packaged into one or more storage containers, which may be used to perform tasks such as storing database data.

[0050] In the disclosed embodiment, the configuration of the working containers in each distributed database can be determined by user needs. For example, the user can configure the type and number of working containers contained in the corresponding distributed database, or configure the resources occupied by each working container, or execute the default configuration, etc.

[0051] According to an embodiment of the present disclosure, configuration information from a user can be received, and a distributed database corresponding to the user can be generated based on the configuration information. The distributed database includes at least one container, and the at least one container includes at least one of a computing container, a storage container, and a management container.

[0052] For example, users can fill out a configuration list to describe the environmental resources they need. The cloud platform can generate a configuration file based on the configuration list filled out by the user, schedule the corresponding resources through the cloud platform management program, and automatically perform containerized deployment to deploy a distributed database that meets the user's needs. For the first deployment, a cluster manager can be created, which can add custom controllers and scheduler extensions on the cloud platform management program to control and schedule distributed database clusters and mount persistent volume groups. For example, you can configure the monitoring node of the entire distributed database. The master role can be set during deployment to manage the distributed database next. The storage container, computing container, and management container of the distributed database are set to the slave role. Among them, because the storage container is stateful, a persistent volume group can be mounted to ensure normal operation.

[0053] The above operations can be achieved through the cloud platform management program. After the cloud platform management program is built, you only need to select deployment, and all deployments can be automatically completed without manual intervention. The cloud platform can provide command line tools for operation and maintenance operations. If an error occurs in the operation, the operation will be interrupted and the error information will be returned to the operator. Compared with the existing environment construction operation, it is more convenient and faster, without the need for a long approval and equipment configuration process.

[0054] It can be understood that the embodiments of the present disclosure do not limit the ratio and number of storage containers, computing containers and management containers in each distributed database cluster, nor do they limit the resources occupied by each container. Those skilled in the art can set the number of containers in each distributed database cluster and the resources occupied by each container according to actual needs.

[0055] According to the embodiment of the present disclosure, the working status of each working container in the distributed database can be monitored in real time. The working status can include, for example, a normal state or an abnormal state.

[0056] In operation S202, in response to monitoring that an abnormality occurs in a working container in a distributed database, configuration parameters of the working container in which the abnormality occurs are obtained.

[0057] According to an embodiment of the present disclosure, in response to monitoring an abnormality in a certain working container, the configuration parameters of the working container can be obtained. The configuration parameters may include, for example, resource information occupied by the working container. For example, in response to monitoring an abnormality in a certain storage container, the storage space information occupied by the storage container can be obtained. Alternatively, in response to monitoring an abnormality in a certain computing container, the CPU usage and memory usage information occupied by the computing container can be obtained.

[0058] In an embodiment of the present disclosure, the abnormality of the working container may be that the working container fails and cannot continue to process the work task. For example, the computing container is hung up and cannot operate normally.

[0059] In another embodiment of the present disclosure, the abnormality of the working container may also be that the operating index of the working container exceeds a preset threshold, and it can be determined that the working container is under too much pressure and cannot take on more work tasks. The operating index may include, for example, storage space, CPU usage, or memory usage, etc. For example, the occupied storage space of the storage container has exceeded 90% of the total storage space. For another example, the current CPU usage and content usage of the computing container reach the bottleneck threshold.

[0060] In operation S203, a spare container is generated based on the configuration parameters.

[0061] According to the embodiment of the present disclosure, a backup container can be generated based on the configuration parameters of the abnormal working container using backup resources. The backup resources can be, for example, backup resources in the distributed database where the abnormal working container is located, or backup resources in other distributed databases.

[0062] For example, if a working container fails, a standby container with the same configuration parameters as the failed working container can be generated. For example, if a storage container with 1 GB of storage space fails, a standby storage container with 1 GB of storage space can be generated.

[0063] For another example, when the operating index of the working container exceeds a preset threshold, a backup container can be generated based on the operating index. For example, if the CPU usage of the computing container exceeds a preset threshold, its current work pressure can be considered and a backup computing container sufficient to share its work pressure can be generated.

[0064] In operation S204, at least part of the work tasks of the working container where the abnormality occurs are allocated to the spare container.

[0065] In an embodiment of the present disclosure, when a working container fails, all work tasks of the failed working container may be allocated to a spare container, so that the spare container replaces the failed working container.

[0066] In another embodiment of the present disclosure, when the operating index of a working container exceeds a preset threshold, part of the work tasks of the working container can be allocated to a backup container, so that the backup container can share the work pressure of the original working container and realize automatic capacity expansion.

[0067] According to the embodiment of the present disclosure, in response to monitoring that the abnormal working container has returned to normal, the work tasks of the standby container can be allocated to the working container that has returned to normal, and the resources occupied by the standby container can be released. For example, all the work tasks of the standby container can be allocated to the working container that has returned to normal, and the resources occupied by the standby container can be released so that these resources can continue to be used as standby resources to generate standby containers for other abnormal working containers.

[0068] In an embodiment of the present disclosure, for a computing container, if it is monitored that a computing container has been down for more than a certain period of time, an attempt can be made to restart the computing container. If the restart fails, it can be determined that the computing container has failed. After determining that the computing container has failed, a message can be sent to the cluster manager, and the cluster manager can generate a spare computing container based on the configuration parameters of the computing container to replace the failed computing container. If it is monitored that the CPU usage or memory usage of a computing container is continuously too high, it can be determined that the computing container is under too much pressure, and a message can be sent to the cluster manager, and the cluster manager can add a spare computing container to share the work tasks of the original computing container. After the computing container returns to normal, the work tasks in the spare computing container can be transferred to the computing container that has returned to normal, and the spare computing container can be deleted to release the resources occupied by the spare computing container.

[0069] In an embodiment of the present disclosure, for a management container, if it is monitored that a certain management container has been down for more than a certain period of time, an attempt can be made to restart the management container. If the restart fails, it can be determined that the management container has failed. Alternatively, if it is monitored that a certain management container has a problem of slow disk writing or too high communication delay between management containers, it can also be determined that the management container has failed. After determining that the management container has failed, the cluster manager can be notified, and the cluster manager can generate a spare management container based on the configuration parameters of the management container to replace the failed management container. If a certain management container is monitored to have a communication congestion problem, it can be determined that the management container is under too much pressure, and a message can be sent to the cluster manager, and the cluster manager can add a spare management container to share the work tasks of the original management container. After the management container returns to normal, the work tasks in the spare management container can be transferred to the management container that has returned to normal, and the spare management container can be deleted to release the resources occupied by the spare management container.

[0070] In an embodiment of the present disclosure, for a storage container, if it is monitored that a storage container has a problem of hanging for more than a certain period of time, the storage container can be tried to be pulled up again. If the re-pulling fails, it can be determined that the storage container is faulty. After determining that the storage container is faulty, the cluster manager can be notified, and the cluster manager can generate a spare storage container based on the configuration parameters of the storage container to replace the faulty storage container. If it is monitored that the remaining storage space of a storage container is insufficient, and there are commands to write to the storage container continuously, it can be determined that the storage container is under too much pressure, and a message can be sent to the cluster manager, and the cluster manager can add a spare storage container to share the work tasks of the original storage container. After the storage container is restored to normal, the work tasks in the spare storage container can be transferred to the storage container that has been restored to normal. In some embodiments of the present disclosure, the data in the spare storage container can be automatically synchronized to the storage container that has been restored to normal, and the spare storage container can be automatically deleted after the synchronization is completed to release the resources occupied by the spare storage container. In other embodiments of the present disclosure, the spare storage container can also be deleted in response to the user's deletion operation. For example, the user can manually delete the spare storage container to avoid data loss when it is determined that the data in the spare storage container has been saved.

[0071] The disclosed embodiments make full use of the characteristics of containers to achieve non-perceptual operation and maintenance operations such as automatic cluster failure transfer and elastic scheduling, thereby reducing manual intervention and alleviating the operation and maintenance pressure of operation and maintenance personnel. The disclosed embodiments can use the cloud platform management program to automatically implement containerized deployment, simplify deployment steps, and improve deployment efficiency.

[0072] Figure 3 The block diagram schematically shows a distributed database management device 300 according to an embodiment of the present disclosure.

[0073] like Figure 3 As shown, the device 300 includes a monitoring module 310 , an acquisition module 320 , a first generation module 330 and a first allocation module 340 .

[0074] The monitoring module 310 is used to monitor the working status of each working container in the distributed database.

[0075] The acquisition module 320 is used for acquiring configuration parameters of the abnormal working container in response to monitoring that an abnormal working container in the distributed database occurs.

[0076] The first generating module 330 is used to generate a spare container based on the configuration parameters.

[0077] The first allocation module 340 is used to allocate at least part of the work tasks of the abnormal working container to the spare container.

[0078] According to an embodiment of the present disclosure, the abnormality of the working container includes: a failure of the working container, or an operation index of the working container exceeds a preset threshold.

[0079] According to an embodiment of the present disclosure, allocating at least part of the work tasks of the abnormal working container to the spare container includes: when the working container fails, allocating all the work tasks of the working container to the spare container.

[0080] According to an embodiment of the present disclosure, allocating at least part of the work tasks of the abnormal working container to the spare container includes: when the operating index of the working container exceeds a preset threshold, allocating part of the work tasks of the working container to the spare container.

[0081] According to an embodiment of the present disclosure, the device further includes a second allocation module and a release module. The second allocation module is used to allocate the work tasks of the standby container to the working container that has returned to normal in response to monitoring that the abnormal working container has returned to normal. The release module is used to release the resources occupied by the standby container.

[0082] According to an embodiment of the present disclosure, the device further includes a receiving module and a second generating module. The receiving module is used to receive configuration information from a user. The second generating module is used to generate a distributed database corresponding to the user based on the configuration information, wherein the distributed database includes at least one container, and the at least one container includes at least one of a computing container, a storage container, and a management container.

[0083] According to an embodiment of the present disclosure, the apparatus 300 may, for example, execute the above reference Figure 2 The described method will not be repeated here.

[0084] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.

[0085] For example, any multiple of the monitoring module 310, the acquisition module 320, the first generation module 330 and the first allocation module 340 can be combined in one module / unit / sub-unit for implementation, or any one of the modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of these modules / units / sub-units can be combined with at least part of the functions of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to an embodiment of the present disclosure, at least one of the monitoring module 310, the acquisition module 320, the first generation module 330 and the first allocation module 340 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware and firmware or by a suitable combination of any of them. Alternatively, at least one of the monitoring module 310 , the acquiring module 320 , the first generating module 330 and the first allocating module 340 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be performed.

[0086] Figure 4 A block diagram of an electronic device according to an embodiment of the present disclosure is schematically shown. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0087] like Figure 4 As shown, the electronic device 400 according to an embodiment of the present disclosure includes a processor 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage part 408 into a random access memory (RAM) 403. The processor 401 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 401 may also include an onboard memory for caching purposes. The processor 401 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0088] In RAM 403, various programs and data required for the operation of system 400 are stored. Processor 401, ROM 402 and RAM 403 are connected to each other through bus 404. Processor 401 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 402 and / or RAM 403. It should be noted that the program can also be stored in one or more memories other than ROM 402 and RAM 403. Processor 401 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0089] According to an embodiment of the present disclosure, the system 400 may further include an input / output (I / O) interface 405, which is also connected to the bus 404. The system 400 may further include one or more of the following components connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.

[0090] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 409, and / or installed from the removable medium 411. When the computer program is executed by the processor 401, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0091] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0092] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.

[0093] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 402 and / or the RAM 403 described above and / or one or more memories other than the ROM 402 and the RAM 403 .

[0094] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0095] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0096] The embodiments of the present disclosure are described above. However, these embodiments are only for the purpose of illustration and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A distributed database management method, comprising: Monitor the working status of each working container in the distributed database; In response to monitoring that an abnormality occurs in a working container in the distributed database, obtaining configuration parameters of the working container where the abnormality occurs, wherein the configuration parameters include resource information occupied by the working container; The abnormality of the working container includes: the operating index of the working container exceeds a preset threshold; Based on the configuration parameters, using the spare resources, generating a spare container; The generating a spare container using spare resources based on the configuration parameters includes: generating a spare container based on the operating indicator when the operating indicator of the working container exceeds a preset threshold; and Allocating at least part of the work tasks of the abnormal working container to the spare container; The allocating at least part of the work tasks of the abnormal working container to the standby container includes: when the operating index of the working container exceeds a preset threshold, allocating part of the work tasks of the working container to the standby container, and sharing the working pressure of the working container through the standby container to achieve automatic capacity expansion; In response to monitoring that the abnormal working container returns to normal, allocating the working tasks of the standby container to the working container that returns to normal; and The resources occupied by the standby container are released so that the resources continue to be used as standby resources to generate standby containers for other working containers that have abnormalities.

2. The method according to claim 1, wherein: The working container is abnormal, including: The working container fails.

3. The method according to claim 2, wherein: Allocating at least part of the work tasks of the abnormal working container to the standby container includes: In the event of a failure of the working container, all work tasks of the working container are distributed to the backup container.

4. The method according to claim 1, further comprising: Receive configuration information from the user; A distributed database corresponding to the user is generated based on the configuration information, wherein the distributed database includes at least one container, and the at least one container includes at least one of a computing container, a storage container, and a management container.

5. A distributed database management device, comprising: A monitoring module, used for monitoring the working status of each working container in the distributed database; An acquisition module, configured to acquire configuration parameters of the abnormal working container in response to monitoring that an abnormal working container in the distributed database occurs, wherein the configuration parameters include resource information occupied by the working container; The abnormality of the working container includes: the operating index of the working container exceeds a preset threshold; A first generating module, configured to generate a spare container using spare resources based on the configuration parameters; The generating a spare container using spare resources based on the configuration parameters includes: generating a spare container based on the operating indicator when the operating indicator of the working container exceeds a preset threshold; and A first allocation module, configured to allocate at least part of the work tasks of the abnormal working container to the spare container; The allocating at least part of the work tasks of the abnormal working container to the standby container includes: when the operating index of the working container exceeds a preset threshold, allocating part of the work tasks of the working container to the standby container, and sharing the working pressure of the working container through the standby container to achieve automatic capacity expansion; A second allocation module is configured to allocate the work tasks of the standby container to the working container that has returned to normal in response to monitoring that the working container that has been abnormal has returned to normal; and The release module is used to release the resources occupied by the standby container, so that the resources can continue to be used as standby resources to generate standby containers for other working containers with abnormalities.

6. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors execute the method according to any one of claims 1 to 4.

7. A computer-readable medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 4.