Multi-Cluster Database Management System and Method

The multi-cluster database management system addresses user experience issues by providing unified management and efficient data synchronization across geographically distributed PostgreSQL databases, enhancing user experience and management efficiency.

CN114996337BActive Publication Date: 2025-07-15XIAN TONGXING HENGYAO INFORMATION TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210580022.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-25
Publication Date
2025-07-15
Estimated Expiration
2042-05-25

AI Technical Summary

Technical Problem

In the prior art, the PostgreSQL database management system can only manage a single server cluster, resulting in frequent switching of the system when accessing or deploying multiple server clusters provided by multiple regions or multiple vendors, affecting the user experience.

Method used

A multi-cluster database management system is designed to receive database instance operation requests through the first API service component and forward them to the target server cluster for operation. Combined with the metadata management module to store resource status information, coordinate the component to listen for resource status changes and synchronize it to the metadata management module to realize unified management of multiple server clusters.

Benefits of technology

It realizes unified management of multiple server clusters, improves user experience, reduces data transmission process, improves database management efficiency, and supports load balancing and rapid scaling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114996337B_ABST
    Figure CN114996337B_ABST
Patent Text Reader

Abstract

The present disclosure provides a multi-cluster database management system and method, relating to the technical field of databases. The system includes: a plurality of server clusters, a first API service component, and a metadata management module. The first API service component is configured to receive a database instance operation request, where the database instance operation request includes target cluster identification information and resource identification information corresponding to the database instance operation; and forward the database instance operation request to a target server cluster based on the target cluster identification information, so that the target server cluster performs corresponding database instance operations based on the database instance operation request and updates the resource status information after the operations. The present disclosure can solve the problem of poor user experience caused by system switching during the access or deployment of multiple server clusters provided by multiple regions or multiple vendors in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of database technologies, and in particular, to a multi-cluster database management system, a multi-cluster database management method, a computer-readable storage medium, and an electronic device. Background Art

[0002] PostgreSQL is an object-relational database management system. PostgreSQL supports most SQL standards and provides many other modern features: complex queries, foreign keys, triggers, views, transaction integrity, and multi-version concurrency control system (MVCC).

[0003] In the related art, PostgreSQL generally can only manage a single server cluster for a database server cluster, and multiple server clusters provided in multiple regions or by multiple suppliers need to be managed separately. This results in users constantly switching systems when accessing or deploying multiple server clusters, affecting the user experience.

[0004] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention

[0005] The purpose of the embodiments of the present disclosure is to provide a multi-cluster database management system, a multi-cluster database management method, a computer-readable storage medium, and an electronic device, thereby solving to a certain extent the problem of poor user experience caused by system switching during the access or deployment of multiple server clusters provided in multiple regions or by multiple suppliers in the related art.

[0006] According to a first aspect of the present disclosure, there is provided a multi-cluster database management system, including:

[0007] Multiple server clusters, where the multiple server clusters are distributed in different regions;

[0008] A first application programming interface (API) service component, configured to receive a database instance operation request including target cluster identification information and resource identification information corresponding to a database instance operation, and forward the database instance operation request to a target server cluster based on the target cluster identification information, so that the target server cluster performs corresponding database instance operations based on the database instance operation request and updates the operation-after resource status information corresponding to the resource identification information; the target server cluster includes one or more of the multiple server clusters;

[0009] A metadata management module, configured to receive and store the resource status information corresponding to the database instance operations forwarded by the first API service component.

[0010] In an exemplary embodiment of the present disclosure, based on the foregoing solution, each of the server clusters includes:

[0011] A second API service component, configured to communicate with the first API service component to obtain the database instance operation request forwarded by the first API service component, and construct a corresponding custom resource based on the database instance operation request;

[0012] An execution module, configured to execute corresponding database instance operations according to the custom resource and update the resource status information after the operations.

[0013] In an exemplary embodiment of the present disclosure, based on the foregoing solution, each of the server clusters further includes a third API service component; the system further includes:

[0014] A coordination component, configured to listen for changes in the resource status of the corresponding database instance through the third API service component, and synchronize the changed resource status information to the metadata management module.

[0015] In an exemplary embodiment of the present disclosure, based on the foregoing solution, the first API service component is further configured to: in response to a load balancing instruction, adjust the number of replicas corresponding to the database instances in each server cluster.

[0016] In an exemplary embodiment of the present disclosure, based on the foregoing solution, the coordination component is further configured to:

[0017] In response to a change in the number of the server clusters, add or delete the corresponding configuration file of the coordination component for the server cluster and restart the service of the coordination component;

[0018] Or,

[0019] In response to a change in the number of the server clusters, add or delete the service of the coordination component corresponding to the corresponding server cluster.

[0020] In an exemplary embodiment of the present disclosure, based on the foregoing solution, the multiple server clusters are multiple Kubernetes clusters, and the coordination component includes:

[0021] A management control module, configured to create a namespace control module for each Kubernetes cluster;

[0022] A namespace control module is used to listen for namespace events of the corresponding Kubernetes cluster and build a control group for each newly created target namespace, where the target namespace is a namespace carrying an execution module tag.

[0023] A control group is used to listen for the status information of the corresponding Kubernetes cluster.

[0024] In an exemplary embodiment of the present disclosure, based on the foregoing solution, the database is a PostgreSQL database, and the control group includes:

[0025] A PostgreSQL control sub-module is used to listen for the overall status information of the corresponding database instance and update the overall status information of the server cluster listened to in the metadata management module.

[0026] A PostgreSQL replica control sub-module is used to listen for the replica status information of the corresponding database instance and update the replica status information of the server cluster listened to in the metadata management module.

[0027] A PostgreSQL task control sub-module is used to automatically back up the data of the corresponding database instance and / or modify the audit policy of the corresponding server cluster.

[0028] In an exemplary embodiment of the present disclosure, based on the foregoing solution, the first API service component is further used for:

[0029] Configuring one or more of the database parameters, database storage types, and database access methods of the database instance corresponding to the database instance operation request.

[0030] According to the second aspect of the present disclosure, there is provided a multi-cluster database management method, which is applied to a multi-cluster database management system. The system includes multiple server clusters and a metadata management module, and the multiple server clusters are distributed in different regions; the method is characterized in that the method includes:

[0031] Receiving a database instance operation request including target cluster identification information and resource identification information corresponding to the database instance operation, and based on the target cluster identification information, forwarding the database instance operation request to the target server cluster, so that the target server cluster performs corresponding database instance operations based on the database instance operation request and updates the operation-after resource status information corresponding to the resource identification information; the target server cluster includes one or more of the multiple server clusters;

[0032] Receiving and storing the resource status information corresponding to the database instance operation.

[0033] In an exemplary embodiment of the present disclosure, based on the foregoing solution, the method further includes:

[0034] In response to a load balancing instruction, adjust the number of replicas corresponding to the database instances in each server cluster.

[0035] According to a third aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon a computer program, which when executed by a processor, implements the method according to any one of the above.

[0036] According to a fourth aspect of the present disclosure, there is provided an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the method according to any one of the above by executing the executable instructions.

[0037] The exemplary embodiments of the present disclosure may have some or all of the following beneficial effects:

[0038] In the multi-cluster database management system provided by the disclosed exemplary embodiment, on the one hand, by setting up a first API service component for receiving a database instance operation request from a user and forwarding the database instance operation request to a target server cluster, the user can achieve unified management of multiple server clusters by calling the first API service component, enhancing the user experience. On the other hand, by forwarding the relevant information of the database instance operation in the database instance operation request to the metadata management module through the first API service component and storing the relevant information before the database instance operation, subsequent data transmission processes can be reduced, improving the database management efficiency.

[0039] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure and used together with the specification to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0041] Figure 1 A schematic diagram showing an exemplary system architecture of a multi-cluster database management system and apparatus to which embodiments of the present disclosure can be applied.

[0042] Figure 2 A schematic diagram schematically showing the architecture of a multi-cluster database management system according to an embodiment of the present disclosure.

[0043] Figure 3 Schematically shows a schematic diagram of the operation management architecture within a server cluster according to an embodiment of the present disclosure.

[0044] Figure 4 Schematically shows a schematic diagram of the architecture of a multi-cluster database management system according to another embodiment of the present disclosure.

[0045] Figure 5 Schematically shows a schematic diagram of the control management architecture of a coordination component according to an embodiment of the present disclosure.

[0046] Figure 6 Schematically shows a flowchart of a multi-cluster database management method according to an embodiment of the present disclosure.

[0047] Figure 7 Shows a schematic diagram of the structure of a computer system of an electronic device suitable for implementing the embodiments of the present disclosure. Detailed implementation manners

[0048] Now, example embodiments will be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more complete and comprehensive, and will fully convey the concept of the example embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will realize that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be used. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring the various aspects of the present disclosure.

[0049] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0050] For the convenience of understanding the embodiments of the present invention, several elements introduced in the description of the embodiments of the present disclosure are first introduced herein:

[0051] A database is a repository that organizes, stores, and manages data according to a data structure. Each database has one or more different APIs for creating, accessing, managing, searching, and replicating the stored data.

[0052] PostgreSQL is an object-relational database server (object-relational database management system) for securely storing data. It is an open-source system developed by the PostgreSQL Global Development Group. PostgreSQL is cross-platform and can run on many operating systems such as Linux, OSX, and Microsoft Windows. PostgreSQL implements the Multi-Version Concurrency Control (MVCC) function and can add custom functions developed using different programming languages (such as C / C++, Java, etc.); it can customize data types, index types, function languages, etc.

[0053] Kubernetes (i.e., k8s) is a container scheduling and orchestration platform that can easily configure and manage a large number of containers in a cluster. A computing host in the cluster is called a node.

[0054] Figure 1 The schematic diagram of an exemplary system architecture 100 of an application environment of a multi-cluster database management system and method that can be applied to the embodiments of the present disclosure is shown. As Figure 1 shown, the system architecture 100 may include a client host 101 and multiple server clusters 102 on the server side. The client host 101 and each server cluster 102 are connected through network communication. The multiple server clusters are located in different regions, and as long as the different regions can communicate with each other, this example does not limit the specific regional scope of the different server clusters. The client host 101 can be any form of computing device, such as a desktop computer, a laptop computer, a mobile terminal device, etc., and this example does not limit this.

[0055] The metadata management module of the embodiments of the present disclosure can be deployed on the background server of the client host 101 or in the server cluster 102 on the server side. The first API service component of the embodiments of the present disclosure can be deployed on the background server of the client host 101 or in the server cluster 102 on the server side. Users can call the first API service component through the front-end operation page of the client host 101 to manage the databases stored in the server cluster 102. The server cluster 102 can be composed of local servers or cloud servers, and this example does not limit this.

[0056] The technical solutions of the embodiments of the present disclosure are elaborated in detail below:

[0057] Reference Figure 2 As shown, a multi - cluster database management system according to an exemplary embodiment provided by the present disclosure may include:

[0058] Multiple server clusters 210, and the multiple server clusters are distributed in different regions.

[0059] In this exemplary embodiment, the multiple server clusters may be located in different regions, or may be different server clusters provided by different vendors, and the server clusters may be cloud server clusters. Each server cluster can be used to perform database instance operations (such as creating a database instance).

[0060] A first Application Program Interface (API) service component 220, configured to receive a database instance operation request including target cluster identification information and resource identification information corresponding to the database instance operation, and forward the database instance operation request to a target server cluster based on the target cluster identification information, so that the target server cluster performs corresponding database instance operations based on the database instance operation request and updates the operation - after resource status information corresponding to the resource identification information; the target server cluster includes one or more of the multiple server clusters.

[0061] In this exemplary embodiment, the database instance operation request may be sent by a user, and the user may be a subject who manages, develops, or uses the server cluster; for example, an end - user, an application developer, and a database administrator (such as a database operation and maintenance personnel). The type of the user is not limited in this example. Regardless of the type of user, the first API service component can be used to perform relevant operations on the database instances of the multiple server clusters.

[0062] For example, when the user is an end - user using the database, the database instance operation request may be a request to create or delete a database instance. When the user is an application developer developing the database, the database instance operation request may be a request to modify or design the content, structure, storage result, and access policy of the database instance. When the user is a database administrator managing the database, the database instance operation request may be a request to maintain, improve, or reorganize the database instance.

[0063] In the present exemplary embodiment, a database instance operation request may include target cluster identification information and resource status information corresponding to the database instance operation, and may also include various parameter configuration information corresponding to the database instance operation; the database instance operation may be different operations on the database instance by different users. For example, creating or deleting a certain database instance. The target cluster identification information may include the target cluster ID, may also include the target cluster IP address, and may also include information such as the target cluster region. This exemplary embodiment does not make special limitations on this. The resource status information corresponding to the database instance operation may include information such as the storage capacity, data type, operating environment requirements, and implementation interface of the data involved in the database instance operation. The resource status information corresponding to the database instance operation is used to describe the information of the data and its environment corresponding to the database instance operation.

[0064] In the present exemplary embodiment, multiple server clusters may be server clusters in different regions, or may be cloud server clusters provided by different vendors. The target server cluster may be determined according to the target cluster identification, and the corresponding database instance operation may be performed by the target server cluster. For example, creating or deleting a database instance in the target server cluster.

[0065] In the present exemplary embodiment, the first API service component 220 may be an open API, which is convenient for users to access. Users can perform database instance operations on multiple server clusters through the first API service component 220, avoiding the problem of poor user experience caused by the separate management of server clusters of different vendors.

[0066] The metadata management module 230 is configured to receive and store the resource status information corresponding to the database instance operation forwarded by the first API service component.

[0067] In the present exemplary embodiment, the metadata management module 230 may include a metadata management library, in which relevant information on multiple server clusters is stored and managed. For example, information such as the data type, data structure, database running status, operating environment requirements, and configuration parameters of each database. The resource status information corresponding to the database instance operation is forwarded by the first API service component 220 to the metadata management module 230 for storage.

[0068] The multi-cluster database management system provided in this example, on the one hand, sets up a first API service component to receive database instance operation requests from users and forward the database instance operation requests to the target server cluster, enabling users to achieve unified management of multiple server clusters by calling this first API service component and enhancing the user experience. On the other hand, the relevant information of the database instance operation in the database instance operation request is forwarded to the metadata management module through the first API service component, and the relevant information is stored before the database instance operation, which can reduce the subsequent data transmission process and improve the database management efficiency.

[0069] In some embodiments, referring to Figure 3 , each of the said server clusters includes:

[0070] A second API service component 212, configured to receive the database instance operation request forwarded by the first API service component and construct a corresponding custom resource based on the database instance operation request.

[0071] In the implementation manner of this example, the second API service component 212 may be an interface service component related to database instance operations. In this example, the second API service component 212 is improved by exposing its IP address to the first API service component 220 to achieve the communication connection between the second API service component 212 and the first API service component 220, so that the second API service component 212 can obtain the database instance operation request and then construct a corresponding custom resource (Custom Resource, CR) based on this request. For example, if the database instance operation request is to create a database instance, then the resources required for this database instance in the user request are constructed (such as the security running environment required for the database instance, the storage type or storage space required for the database instance, etc.).

[0072] In the implementation manner of this example, the second API service component 212 may also update the resource status information after the database instance operation.

[0073] An execution module 214, configured to perform corresponding database instance operations according to the custom resource and update the resource status information after the operation.

[0074] In the implementation manner of this example, the execution module 214 is the specific execution module of the database instance operation request. For example, the execution module 214 may create a database instance that meets the request in the target server cluster based on the custom resource according to the create database instance request. After creating a new database instance, the resource status information of this database instance needs to be gradually updated. For example, in the initial stage of creation, it may be in an initialization state and gradually change to a normal use state (running state).

[0075] In some embodiments, referring to Figure 4 , each of the server clusters 210 further includes a third API service component 216; the system further includes:

[0076] A coordination component 240, configured to listen for changes in the resource status within the corresponding server cluster through the third API service component 216, and synchronize the changed resource status information to the metadata management module.

[0077] In this exemplary embodiment, the coordination component 240 can provide listening management for database instances within multiple server clusters. By invoking the third API service component 216 within each server cluster to listen for changes in the resource status within that cluster, the latest resource status information is synchronized to the metadata management module, so that the database resource status information within the metadata management module is consistent with the actual situation.

[0078] In some embodiments, referring to Figure 4 , each of the server clusters 210 further includes a management engine for managing container processes within each cluster. For example, it can be a K8S management engine (K8S engine).

[0079] In some embodiments, the first API service component 220 is further configured to:

[0080] In response to a load balancing instruction, adjust the number of replicas corresponding to database instances within each server cluster.

[0081] In this exemplary embodiment, the user can directly modify (add or delete) the number of replicas of database instances within each server cluster through the first API service component 220 to balance the business load within the server cluster; it has no direct association with the number of underlying server clusters, and it can very conveniently implement the expansion or reduction of the management system control plane.

[0082] In some embodiments, the coordination component 240 is further configured to:

[0083] In response to a change in the number of clusters of the multiple server clusters, add or delete the corresponding configuration file of the coordination component for the server cluster and restart the service of the coordination component; or, in response to a change in the number of clusters of the multiple server clusters, add or delete the service of the coordination component corresponding to a server cluster.

[0084] In this exemplary embodiment, for different users, the database usage permissions on the server clusters they have are different. That is to say, the number of server clusters corresponding to different users may be different. Thus, when deploying the management system of this example for different users, the corresponding configuration files of the coordination component for the server clusters can be added (increasing the number of corresponding server clusters) or deleted (decreasing the number of corresponding server clusters), and the service of the coordination component can be restarted. It is also possible to directly add or delete the service of the coordination component corresponding to a server cluster. The above two methods can both achieve the adjustment (expansion or reduction) of the control plane of this system.

[0085] In some embodiments, referring to Figure 5 As shown, the multiple server clusters 210 include multiple Kubernetes clusters, and the coordination component 240 includes:

[0086] A management control module 242, configured to create a namespace control module for each Kubernetes cluster.

[0087] In this exemplary embodiment, the multiple server clusters 210 may be Kubernetes clusters respectively. The management control module 242 is responsible for maintaining the status of the clusters, such as fault detection, auto-scaling, rolling updates, etc. The management control module 242 is started according to the kubernetes cluster configuration; a namespace control module (Namespace Controller) can be created for each server cluster 210.

[0088] A namespace control module 244, configured to listen for namespace events of the corresponding Kubernetes cluster, and construct a control group for each newly created target namespace, where the target namespace is a namespace carrying an execution module label.

[0089] In this exemplary embodiment, the database management of the Kubernetes cluster performs container process management based on namespace events, realizing cloud-native database management applicable to the Kubernetes cluster.

[0090] A control group 246, configured to listen for status information of the corresponding Kubernetes cluster.

[0091] In this exemplary embodiment, the control group 246 can listen for the overall running status and replica status within the corresponding Kubernetes cluster, and can also update the listened status information to the metadata management module. It can also control tasks such as automatic backup of the corresponding Kubernetes cluster.

[0092] In some embodiments, referring to Figure 5, the database includes a PostgreSQL database, and the control group 246 includes:

[0093] The PostgreSQL control sub-module 2462 is used to monitor the overall status information of the corresponding database instance and update the monitored overall status information of the server cluster to the metadata management module.

[0094] The PostgreSQL replica control sub-module 2464 is used to monitor the replica status information of the corresponding database instance and update the monitored replica status information of the server cluster to the metadata management module.

[0095] The PostgreSQL task control sub-module 2466 is used to automatically back up the data of the corresponding database instance and / or modify the audit policy of the corresponding server cluster.

[0096] In the present exemplary embodiment, the dashed line indicates synchronizing the latest status information or the data of the server cluster monitored by the PostgreSQL control sub-module 2462, the PostgreSQL replica control sub-module 2464, and the PostgreSQL task control sub-module 2466 to the metadata management module.

[0097] In some embodiments, the first API service component 220 is further used for:

[0098] Configuring one or more of the database parameters, database storage types, and database access methods of the database instance corresponding to the database instance operation request.

[0099] In the present exemplary embodiment, the database parameters may include information such as the data type, data structure, and storage space required for the data of the database. The database storage type may include cloud disk storage and local disk storage. The database access method may include a load balance (LB) method and a database instance IP method. The above information can be configured through the first API service component 220.

[0100] The present disclosure is directed to a database server cluster in different regions. By designing a first API service component, a unified management system for multiple database server clusters is formed. Through the first API service component, corresponding operations can be performed on database instances within the server cluster associated therewith, avoiding the need to switch between server clusters of different vendors and enhancing the user experience. In addition, through horizontal scaling of the first API service component, unified management of more clusters can be achieved, improving the business load capacity and providing an important basis for the unified management of large database clusters. In summary, the present disclosure can provide a unified management entry for cloud-native databases (PostgreSQL) applicable to multiple server clusters (such as Kubernetes), enabling rapid horizontal scaling and improving the business load capacity.

[0101] Furthermore, in the exemplary embodiment of the present disclosure, a multi-cluster database management method is also provided. The multi-cluster database management method can be applied to a multi-cluster database management system, which includes multiple server clusters and a metadata management module, and the multiple server clusters are distributed in different regions. The method includes:

[0102] Step 610, receiving a database instance operation request including target cluster identification information and resource identification information corresponding to a database instance operation, and based on the target cluster identification information, forwarding the database instance operation request to a target server cluster, so that the target server cluster performs corresponding database instance operations based on the database instance operation request and updates the operation status information of the resource corresponding to the resource identification information; the target server cluster includes one or more of the multiple server clusters.

[0103] Step 620, receiving and storing the resource status information corresponding to the database instance operation through the metadata management module.

[0104] In an exemplary embodiment of the present disclosure, the method further includes:

[0105] Responding to a load balancing instruction to adjust the number of replicas corresponding to database instances within each server cluster.

[0106] In an exemplary embodiment of the present disclosure, each server cluster includes a second API service component and an execution module. The performing corresponding database instance operations based on the database instance operation request and updating the operation status information of the resource after the operation includes:

[0107] Receiving the database instance operation request forwarded by the first API service component and constructing a corresponding custom resource based on the database instance operation request.

[0108] Perform corresponding database instance operations according to the custom resources and update the resource status information after the operations.

[0109] In an exemplary embodiment of the present disclosure, each of the server clusters further includes a third API service component; the method further includes:

[0110] Monitor the change of the resource status of the corresponding database instance and synchronize the changed resource status information to the metadata management module.

[0111] In an exemplary embodiment of the present disclosure, the system further includes a coordination component, and the method further includes:

[0112] In response to the change in the number of the server clusters, add or delete the corresponding configuration files of the coordination component for the server clusters and restart the service of the coordination component; or, in response to the change in the number of the server clusters, add or delete the service of the coordination component corresponding to one server cluster.

[0113] In an exemplary embodiment of the present disclosure, multiple server clusters include multiple Kubernetes clusters; the coordination component includes a management control module, and the method further includes:

[0114] Create a namespace control module for each Kubernetes cluster.

[0115] Monitor the namespace events of the corresponding Kubernetes cluster and construct a control group for each newly created target namespace, where the target namespace is a namespace carrying an execution module label.

[0116] Monitor the status information of the corresponding Kubernetes cluster.

[0117] In an exemplary embodiment of the present disclosure, the method further includes:

[0118] Configure one or more of the database parameters, database storage types, and database access methods of the database instance corresponding to the database instance operation request.

[0119] The specific details of each step in the above multi-cluster database management method have been described in detail in the corresponding multi-cluster database management system, so they will not be elaborated here.

[0120] The accompanying drawings herein are incorporated into and form a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0121] As another aspect, the present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may exist alone without being assembled into the electronic device. The above computer-readable storage medium carries one or more programs, and when the one or more programs are executed by an electronic device, the electronic device is caused to implement the methods described in the following embodiments. For example, the electronic device may implement the various steps as shown in Figure 6 and so on.

[0122] It should be noted that the computer-readable storage medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, 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), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. And in the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable storage medium other than the computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical fiber, RF, etc., or any suitable combination of the above.

[0123] Figure 7The structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present disclosure is shown.

[0124] It should be noted that Figure 7 The computer system 700 of the shown electronic device is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.

[0125] As Figure 7 shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 702 or the program loaded from the storage section 708 into the random access memory (RAM) 703. In the RAM 703, various programs and data required for system operation are also stored. The CPU 701, ROM 702, and RAM 703 are connected to each other via a bus 704. The input / output (I / O) interface 705 is also connected to the bus 704.

[0126] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed so that a computer program read from it can be installed into the storage section 708 as needed.

[0127] Particularly, according to the embodiments of the present disclosure, the processes described below with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network through the communication section 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, various functions defined in the methods and apparatuses of the present application are executed.

[0128] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks may occur in a different order than noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and combinations of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or by a combination of dedicated hardware and computer instructions.

[0129] It should be noted that although the steps of the methods in the present disclosure are described in a specific order in the accompanying drawings, this does not require or imply that these steps must be performed in that specific order, or that all of the steps shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc., all of which should be considered as part of the present disclosure.

[0130] It should be understood that the present disclosure as disclosed and defined in this specification extends to all alternative combinations of two or more separate features mentioned or evident in the text and / or the accompanying drawings. All such different combinations constitute multiple alternative aspects of the present disclosure. The embodiments of this specification illustrate the best mode known for implementing the present disclosure and will enable those skilled in the art to utilize the present disclosure.

Claims

1. A multi-cluster database management system, characterized in that, Including: Multiple server clusters, with multiple of the server clusters distributed in different regions; A first Application Programming Interface (API) service component, configured to receive a database instance operation request including target cluster identification information and resource identification information corresponding to a database instance operation, and based on the target cluster identification information, forward the database instance operation request to a target server cluster, so that the target server cluster performs corresponding database instance operations based on the database instance operation request and updates the operation - after resource status information corresponding to the resource identification information; The target server cluster includes one or more of the multiple server clusters; A metadata management module, configured to receive and store the resource status information corresponding to the database instance operation forwarded by the first API service component.

2. The multi-cluster database management system according to claim 1, wherein Each of the server clusters includes: A second API service component, configured to receive the database instance operation request forwarded by the first API service component and construct a corresponding custom resource based on the database instance operation request; An execution module, configured to perform corresponding database instance operations according to the custom resource and update the operation - after resource status information.

3. The multi-cluster database management system according to claim 1 or 2, characterized in that, Each of the server clusters further includes a third API service component; The system further includes: A coordination component, configured to listen for changes in the resource status of the corresponding database instance through the third API service component and synchronize the changed resource status information to the metadata management module.

4. The multi-cluster database management system according to claim 1, wherein The first API service component is further configured to: In response to a load - balancing instruction, adjust the number of replicas corresponding to the database instances within each server cluster.

5. The multi-cluster database management system according to claim 3, characterized in that, The coordination component is further configured to: In response to a change in the number of server clusters, add or delete the corresponding configuration file of the coordination component for the server cluster and restart the service of the coordination component; Or, In response to a change in the number of server clusters, add or delete the service of the corresponding coordination component for the corresponding server cluster.

6. The multi-cluster database management system according to claim 3, wherein The multiple server clusters are multiple Kubernetes clusters, and the coordination component includes: A management control module, configured to create a namespace control module for each Kubernetes cluster; A namespace control module, configured to listen for namespace events of the corresponding Kubernetes cluster and construct a control group for each newly created target namespace, where the target namespace is a namespace carrying an execution module label; A control group, configured to listen for the status information of the corresponding Kubernetes cluster.

7. The multi-cluster database management system according to claim 6, wherein The database is a PostgreSQL database, and the control group includes: A PostgreSQL control sub - module, configured to listen for the overall status information of the corresponding database instance and update the overall status information of the server cluster listened to in the metadata management module; A PostgreSQL replica control sub - module, configured to listen for the replica status information of the corresponding database instance and update the replica status information of the server cluster listened to in the metadata management module; The PostgreSQL task control sub-module is used to automatically back up the data of the corresponding database instance and / or modify the audit policy of the corresponding server cluster.

8. The multi-cluster database management system according to claim 2, wherein The first application programming interface (API) service component is further used for: Configuring one or more of the database parameters, database storage types, and database access methods of the database instance corresponding to the database instance operation request.

9. A multi-cluster database management method, applied to a multi-cluster database management system, the system comprising a plurality of server clusters and a metadata management module, the plurality of server clusters being distributed in different regions; characterized in that, The method includes: Receiving a database instance operation request including target cluster identification information and resource identification information corresponding to the database instance operation, and forwarding the database instance operation request to a target server cluster based on the target cluster identification information, so that the target server cluster performs corresponding database instance operations based on the database instance operation request and updates the operation-after resource status information corresponding to the resource identification information; the target server cluster includes one or more of the multiple server clusters; Receiving and storing the resource status information corresponding to the database instance operation.

10. The multi-cluster database management method according to claim 9, wherein The method further includes: Responding to a load balancing instruction to adjust the number of replicas corresponding to the database instances in each server cluster.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by a processor, it implements the method described in claim 9 or 10.

12. An electronic device, characterized in that, Including: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the method described in claim 9 or 10.

Citation Information

Patent Citations

  • Multi-cluster data processing system and method

    CN112104723A

  • Container cluster management method and device and cloud calculation platform

    CN113835844A

  • Edge distributed management and control system, method and equipment and storage medium

    CN114301909A