CN115510167B - Distributed database system and electronic equipment - Google Patents

Distributed database system and electronic equipment Download PDF

Info

Publication number
CN115510167B
CN115510167B CN202211472755.2A CN202211472755A CN115510167B CN 115510167 B CN115510167 B CN 115510167B CN 202211472755 A CN202211472755 A CN 202211472755A CN 115510167 B CN115510167 B CN 115510167B
Authority
CN
China
Prior art keywords
pod
database
master
slave
distributed database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211472755.2A
Other languages
Chinese (zh)
Other versions
CN115510167A (en
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anchao Cloud Software Co Ltd
Original Assignee
Anchao Cloud Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Anchao Cloud Software Co Ltd filed Critical Anchao Cloud Software Co Ltd
Priority to CN202211472755.2A priority Critical patent/CN115510167B/en
Publication of CN115510167A publication Critical patent/CN115510167A/en
Application granted granted Critical
Publication of CN115510167B publication Critical patent/CN115510167B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Abstract

The invention provides a distributed database system and an electronic device, wherein the distributed database system responds to a database access request initiated by a user and comprises the following components: the system comprises a main controller, a Statefulset object controlled by the main controller, a PDB object and a proxy server; generating a plurality of Pods by the Statefulset object to form a Pod cluster, limiting a threshold range of the Pod number in the Pod cluster by the PDB object, forming a reference relation between the Statefulset object and the PDB object, acquiring the threshold range based on the reference relation, and adjusting the Pod number to be within the threshold range; and the proxy server carries out management request and service request forwarding on the Pod cluster. According to the invention, maintenance and management of the distributed database are realized without depending on an external system, and a series of problems caused by confusion of environment control objects can be avoided.

Description

Distributed database system and electronic equipment
Technical Field
The present invention relates to the field of database technologies, and in particular, to a distributed database system and an electronic device.
Background
"orchestration" refers primarily to the process performed by the cloud computing platform in accordance with these specified logic, by how a user, through some tools or configuration, completes the definition, configuration, creation, deletion, etc. of a set of virtual machines and associated resources. "container orchestration" is a tool that specifies the organization and management specifications of containers, most typically Kubernetes. Kubernetes is a tool for container orchestration that can be used as an infrastructure to build application systems. The application and the application data contained in the established application system are in a split state, so that unified management of the application and the application data cannot be performed; meanwhile, a communication network is also required to be built between the application and the application data to realize communication, so that the unification of the application and the application data through database migration becomes an urgent need.
Fault tolerance is typically achieved by way of a distributed database during database migration. By "fault tolerant" techniques is meant techniques that ensure that the system will still function properly in the event of a failure or error in some component, i.e., the component may be deleted and the system should continue to function as intended. The distributed database provides services in a mode of one master and multiple slaves, and the master-slave copy function provided by the database can realize multiple backups of data. While multiple databases formed for a master and multiple slaves require the simultaneous management and maintenance of multiple servers (i.e., independent servers where separate databases reside). Meanwhile, when a plurality of servers work cooperatively, other problems of distributed databases, such as network disconnection or brain fracture, can also occur. Thus, there is a need for a logical fusion of multiple servers, databases, and data replication logic that coordinates operation in a simple and consistent manner.
The maintenance of the distributed database disclosed in the prior art needs to rely on an external system (e.g., a monitoring system), and this method builds a communication network between the external system and the system in which the distributed database is located, which increases the probability of system errors. Another method uses the cloud native technology, but does not use the group replication technology to realize database replication, and has the defect of insufficient performance; meanwhile, the monitoring index needs operation and maintenance experience to be realized, so that the defect of insufficient universality exists.
In view of this, there is a need for an improvement over the prior art distributed database systems to address the above-described problems.
Disclosure of Invention
The invention aims to disclose a distributed database system and electronic equipment, which are used for solving the defects that the maintenance and management of a distributed database in the prior art are required to depend on an external system, have insufficient performance and have insufficient universality.
To achieve one of the above objects, the present invention provides a distributed database system, which responds to a database access request initiated by a user;
the distributed database system includes: the system comprises a main controller, a Statefulset object controlled by the main controller, a PDB object and a proxy server;
generating a plurality of Pods by the Statefulset object to form a Pod cluster, limiting a threshold range of the Pod number in the Pod cluster by the PDB object, forming a reference relation between the Statefulset object and the PDB object, acquiring the threshold range based on the reference relation, and adjusting the Pod number to be within the threshold range; the proxy server carries out management request and service request forwarding on the Pod cluster;
the proxy server deploys a service proxy, and the main controller receives the service request and forwards the service request to the service proxy so as to forward the service request to the Pod cluster through the service proxy;
the service agent comprises: a master agent responding to the data writing request and the data reading request forwarded by the master controller and a slave agent responding to the data reading request forwarded by the master controller, wherein the master agent and the slave agent are only exposed to the master controller;
wherein, independently deploy the database container in the Pod.
As a further refinement of the present invention, the distributed database system is built based on Kubernetes deploying a deletion policy to perform a deletion operation on the Statefulset object and PDB object synchronously based on the deletion policy.
As a further improvement of the invention, when the PDB object receives a voluntary interrupt event of the distributed database system, generating a maintenance strategy by the PDB object to maintain based on the maintenance strategy; the voluntary interrupt event includes: one or any combination of a Pod maintenance, upgrade event, node deletion event or Pod deletion event.
As a further improvement of the present invention, the proxy server deploys a management proxy and exposes only to the host controller, receives a management request through the management proxy and creates a unique access name for each Pod by the domain name system, and monitors the Pod to obtain status information of each Pod and records.
As a further improvement of the invention, the Init container and the tag controller are arranged in the Pod, the Init container initializes the database containers in the same Pod to form a state of independently providing database services, one master database container and a plurality of slave database containers are determined between the database containers respectively deployed by a plurality of pods based on a master-slave determination strategy, and the tag controller reads metadata information of the database containers in the Pod to which the tag controller belongs to identify role information of the Pod in which the database container belongs based on the metadata information.
As a further improvement of the present invention, the master agent determines a master database container according to the role information and forwards the data write request and the data read request to the master database container determined by the master-slave determination policy, and the slave agent determines a slave data container according to the role information and forwards the data read request to the slave database container determined based on the master-slave determination policy.
As a further improvement of the invention, if the master database container currently providing the database service is down, one slave database container is selected from a plurality of slave database containers as the master database container based on the master-slave determination strategy.
As a further refinement of the invention, the distributed database system runs independently in a computing device, which is a physical machine or a cluster of virtual machines.
Based on the same inventive idea, the invention also provides an electronic device comprising:
a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor;
the processor, when executing the computer program, performs the logic contained in the distributed database system as set forth in any of the inventions described above.
Compared with the prior art, the invention has the beneficial effects that:
according to the invention, the PDB object is referenced, so that the high availability capability of the Pod cluster is realized, the Pod number in the Pod cluster is ensured to be within the threshold range, and the capability of Kubernetes for managing the database container is also expanded. Meanwhile, by establishing a reference relation between the Statefulset object and the PDB object, random deletion of the Statefulset object is prevented, a series of problems caused by confusion of environment control objects, such as a large number of left-over resources and residual files, are avoided, and waste of resources in a distributed database system is effectively prevented. The containerization of the database solidifies the complicated maintenance operation steps of the distributed database, reduces the requirements of operation and maintenance personnel on maintenance skills of the distributed database and also reduces a lot of requirements. The Pod is monitored by the management agent to obtain the state information of each Pod, and the dependence on an external system is not needed, so that the probability of errors caused by executing maintenance operation on the distributed database system is reduced.
Drawings
FIG. 1 is an overall topology of a distributed database system according to the present invention;
FIG. 2 is a topology of a proxy server;
FIG. 3 is a topology diagram of a service agent;
fig. 4 is a topology of an electronic device according to the present invention.
Detailed Description
The present invention will be described in detail below with reference to the embodiments shown in the drawings, but it should be understood that the embodiments are not limited to the present invention, and functional, method, or structural equivalents and alternatives according to the embodiments are within the scope of protection of the present invention by those skilled in the art.
Referring to fig. 1-3, one embodiment of a distributed database system is shown.
The application scene of the distributed database system disclosed by the invention is that a set of high-availability clusters are deployed after the database is containerized so as to realize the management of the database containers, so that the human errors and repeated labor are reduced through systematic operation, the resource use is centrally managed, the server resource is effectively utilized, and the defects that the maintenance and management of the distributed database in the prior art are required to depend on an external system, insufficient performance and insufficient universality are overcome. The distributed database system illustrated by the present invention operates independently in a computing device (e.g., computer system 1 illustrated in FIG. 1) that is a physical machine or a cluster of virtual machines. In the present embodiment, a distributed database system is exemplarily described as being deployed in the computer system 1.
Referring to FIG. 1, a distributed database system is shown that responds to a user initiated database access request; the database access request refers to any one of a data write request and a data read request. The distributed database system includes: a main controller 10, a Statefulset object 21, a PDB object 22, and a proxy server 2 controlled by the main controller 10.
The Statefulset object 21 generates a number of Pod to form a Pod cluster, the PDB object 22 limits a threshold range of the number of Pod in the Pod cluster, a reference relationship is formed between the Statefulset object 21 and the PDB object 22, the threshold range is obtained based on the reference relationship, the number of Pod in the Pod cluster is adjusted to be within the threshold range, and the proxy server 2 performs forwarding of management requests and forwarding of service requests (i.e., data write requests and data read requests) on the Pod cluster. Wherein the database containers are independently deployed within the Pod. Wherein the PDB object 22 is an interrupt budget (PodDisruptionBudget); statefulset object 21, as the name implies, is a "set of stateful" for managing all stateful services, e.g., mySQL, mongoDB clusters, etc.
Specifically, after a plurality of independent databases are containerized, independent database containers (namely MySQL-1-MySQL-n, wherein n is a positive integer greater than or equal to 2) are formed, and the database containers are in independent relation with each other, so that database services can be independently provided for users. Meanwhile, one master database container and a plurality of slave database containers can be defined between the database containers based on a master-slave determination strategy. The main database container is used for providing data writing service and data reading service to the outside, and the slave database container is used for providing data reading service to the outside. Of course, a master database container and a plurality of slave database containers can be determined by a user, preferably, a master database container and a plurality of slave database containers are determined by a user based on master-slave determination strategies among a plurality of independent database containers, so that manual operation of the user is not required based on systematic operation, and the aims of reducing human errors and repeated labor are fulfilled.
The Statefulset object 21 creates several Pod (i.e., pod-1 to Pod-n, where n is a positive integer greater than or equal to 2) to form a Pod cluster, and deploys database containers independently into pods, i.e., one database container is deployed in each Pod. For example, as shown in FIG. 1, mySQL-1 is deployed to Pod-1, and so on, mySQL-n is deployed to Pod-n.
Several database containers (i.e., mySQL-1-MySQL-n) determine one database container and several slave database containers based on a master-slave determination policy. The master-slave determination policy may be configured by a user with logic issued by a user, or may be configured in advance by a distributed database system and determined by a user selection, which is not limited in this embodiment. The specific content of the master-slave determination policy may be, for example, that the first generated database container is used as a master database container, or that the database container with the highest configuration is used as a master database container, so long as only one master database container and a plurality of slave database containers in the distributed database system can be ensured. When the main database container is removed or is down, and the main database container cannot continuously provide data writing service or data reading service, one slave database container is selected from a plurality of slave database containers to serve as the main database container based on a master-slave determination strategy, so that the main database container is ensured to provide data writing service or data reading service to the outside without interruption, and the aim of ensuring user experience is achieved.
Referring to fig. 2, the proxy server 2 deploys a management agent 23 and a service agent 24. The management agent 23 is exposed only to the master controller 10, i.e. is controlled only by the master controller 10. Specifically, a unique access name is created by the domain name system for each Pod to achieve unique positioning of the Pod by the management agent 23 receiving a management request issued from the user. And (3) carrying out an initialization script inside the init container deployed in the Pod, respectively accessing the database containers deployed in the Pod, initializing and starting the database containers to form a state of independently providing the database services. The database container after initialization and startup can normally provide database services (e.g., the aforementioned data writing service and data reading service) to the outside. For example, the init container-1 deployed by Pod-1 internally initiates a script and accesses MySQL-1 to initialize and launch MySQL-1, and so on. After a master database container and a plurality of slave database containers are determined between database containers respectively deployed by a plurality of Pod based on a master-slave determination strategy, a tag controller deployed in the Pod reads metadata information of the database container in the Pod to which the tag controller belongs, so that role information of the Pod in which the database container belongs is identified based on the metadata information. For example, in Pod-1, the tag controller-1 reads the metadata table-1 of MySQL-1 to determine whether MySQL-1 is the master or slave database container based on the metadata table-1. If MySQL-1 is the main database container, the role information of the identification Pod-1 is the main; if MySQL-1 is the slave database container, the role information identifying Pod-1 is the slave, and so on.
It should be noted that, the management agent 23 is Governing Service, and is controlled by the main controller 10, and is configured to receive a management request issued by a user, create a unique access name for each Pod by using the domain name system, and monitor the Pod to obtain and record status information of each Pod. Since, in the default environment, only when Pod enters the ready state, a record corresponding thereto is generated, for the requirement of stable management, "publishnodreadydata=true" is set to cancel the restriction, thereby ensuring that all pods (i.e., pod entering the ready state and Pod not entering the ready state) generate records corresponding thereto. The init container is one of three containers of Pod for running initialization tasks to guarantee the running environment within the container. Thus, the database container is initialized and started by the init container to ensure that the database container can normally provide a database service (i.e., a data writing service or a data reading service) to the outside. The tag controller is LabelController, which is deployed in the Pod and is used for reading metadata information of a database container deployed in the same Pod so as to identify role information of the Pod based on the metadata information. Since in the Kubernetes environment the semantics provided by Statefulset object 21 guarantee that only one Pod of the same name is in the Pod cluster, i.e. if downtime occurs, statefulset object 21 is not failover. Kubernetes simply reschedules to produce a Pod, but the master-slave relationship between the original database containers may be turbulent. Therefore, the tag controller is deployed in the Pod to identify the role information of the Pod, so as to inform the outside of the own service roles, thereby preventing the disorder of the master-slave relationship.
Referring to fig. 3, service agent 24 includes a master agent 241 and a slave agent 242. Master agent 241 and slave agent 242 are exposed only to master controller 10, i.e., are controlled by master controller 10. The master controller 10 receives the service request and forwards it to the service agent 24 to forward the service request to the Pod cluster via the service agent 24. Wherein master agent 241 is configured to respond to data write requests and data read requests forwarded by master controller 10, and slave agent 242 is configured to respond to data read requests forwarded by master controller 10. After deploying the tag controller in the Pod and identifying the role information for the respective Pod to which the tag controller belongs by the tag controller, the master agent 241 determines a master database container according to the role information (i.e., determines the master Pod according to the role information, thereby determining the master database container deployed in the master Pod), and forwards the data writing request and the data reading request to the master database container to provide the data writing service and the data reading service through the master database container; similarly, the slave agent 242 determines a slave database container from the role information and forwards the data read request to the slave database container to provide the data read service through the slave database container. The master agent 241 is Primary Service, and the slave agent 242 is Standby Service.
Referring to fig. 1, a reference relationship is formed between Statefulset object 21 and PDB object 22. Statefulset object 21 creates Pod to form a Pod cluster. The PDB object 22 generates a maintenance policy by the PDB object 22 upon receipt of the voluntary interrupt event for the distributed database system to maintain based on the maintenance policy. Since Pod clusters need to remain available high, the number of nodes needs to be kept as stable as possible. If downtime occurs, a set of mechanisms is needed to cope with, and thus, the PDB object 22 is used to cope with voluntary interruption. Voluntary interrupt events include: one or any combination of a Pod maintenance, upgrade event, node deletion event or Pod deletion event. For example, draining a node for repair or upgrade, draining a node from a cluster to shrink a node, removing one Pod from a node to allow other pods to use the node, deleting a controller that manages the Pod, updating a Pod template results in the Pod restarting, accidentally deleting the Pod, etc.
The PDB object 22 limits the threshold range of the number of Pod in the Pod cluster. The PDB object 22 includes two key parameters ". Spec.minavailable" and ". Spec.maxunnavailable". The parameter spec, minavailable represents the least available Pod number or proportion to be ensured in the process of voluntary interruption, and the parameter spec, maxunnavailable represents the greatest available Pod number or proportion to be ensured in the process of voluntary interruption. Thus, by establishing a reference relationship between the Statefulset object 21 and the PDB object 22, the Statefulset object 21 obtains a threshold range based on the reference relationship to adjust the number of Pod to be within the threshold range (e.g., if the number of Pod is smaller than the threshold range, then Pod is created, and the database containers are independently deployed in Pod, etc.), thereby ensuring high availability of the database containers contained in the Pod cluster, and also improving the capability of Kubernetes to manage the database containers. In addition, after the Statefulset object 21 and the PDB object 22 form a reference relationship, the Statefulset object is also used for coping with a deletion operation of Kubernetes, preventing random deletion and avoiding a series of problems caused by confusion of an environment control object. After the Statefulset object 21 is deleted, the PDB object 22 for limiting the number of Pod has no effect, so that the Statefulset object 21 is also deleted by the reference relationship, and the purpose of preventing a large amount of legacy resources and residual files from being generated is achieved. A reference relationship is established for Statefulset object 21 and PDB object 22 (i.e., a reference relationship is established for the ownersreference). Thus, the distributed database system is built based on Kubernetes deploying a deletion policy to perform a deletion operation on Statefulset object 21 and PDB object 22 synchronously based on the deletion policy and on Statefulset object 21 and PDB object 22 synchronously based on the reference relationship.
By referring to the PDB object 22, the distributed database system disclosed by the invention realizes the high availability capability of the Pod cluster, ensures that the Pod number in the Pod cluster is within the threshold range, ensures the high availability of the database containers contained in the Pod cluster, and simultaneously expands the capability of managing the database containers by Kubernetes. In addition, by establishing the reference relationship between the Statefulset object 21 and the PDB object 22, random deletion of the Statefulset object 21 is prevented, a series of problems caused by confusion of environment control objects, such as a large number of left-over resources and residual files, are avoided, and waste of resources in the distributed database system is effectively prevented. The containerization of the database solidifies the maintenance operation steps of the distributed database, and reduces the requirements of operation and maintenance personnel on maintenance skills of the distributed database. The Pod is monitored by the management agent 23 to obtain the state information of each Pod, and the dependence on an external system is not needed, so that the error probability caused by executing maintenance operation on the distributed database system is reduced.
Based on the technical solutions included in the specific implementation manner of the distributed database system disclosed in the foregoing embodiments, the present embodiment further discloses a specific implementation manner of the electronic device 500.
Referring to fig. 4, the present embodiment discloses an electronic device 500, including: a processor 51, a memory 52 and a computer program stored in the memory 52 and configured to be executed by said processor 51, the processor 51 performing the steps in a containerized database deployment method according to the previous embodiments when said computer program is executed. Specifically, the memory 52 is composed of a plurality of memory units, i.e. memory unit 521 to memory unit 52j, where the parameter i is a positive integer greater than or equal to two. Both the processor 51 and the memory 52 access a system bus 53. The form of the system bus 53 need not be particularly limited, I 2 The C bus, SPI bus, SCI bus, PCI-e bus, ISA bus, etc., and can be modified as appropriate according to the particular type of electronic device 500 and application scenario requirements. The system bus 53 is not an inventive point of the present application, and is not described in detail in the present application.
It should be noted that, the storage unit 52 in this embodiment may be a physical storage unit, so that the electronic device 500 is understood as a physical computer or a computer cluster or a cluster server; meanwhile, the storage unit 52 may also be a virtual storage unit, for example, based on a virtual storage space formed by a physical storage device through an underlying virtualization technology, so that the electronic device 500 is configured as a virtual device such as a virtual server, a virtual cluster, or the electronic device 500 is understood to be a PC, a tablet computer, a smart phone, a smart wearable electronic device, a physical cluster, or a data center.
The electronic device 500 in this embodiment has the same parts as those in the foregoing embodiments, and is shown in the foregoing embodiments and will not be described in detail herein.
The various illustrative logical blocks or units described in the embodiments of the invention may be implemented or performed with a general purpose processor, a digital signal processor, an Application Specific Integrated Circuit (ASIC), a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described. A general purpose processor may be a microprocessor, but in the alternative, the general purpose processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration.
The above list of detailed descriptions is only specific to practical embodiments of the present invention, and they are not intended to limit the scope of the present invention, and all equivalent embodiments or modifications that do not depart from the spirit of the present invention should be included in the scope of the present invention.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.
Furthermore, it should be understood that although the present disclosure describes embodiments, not every embodiment is provided with a separate embodiment, and that this description is provided for clarity only, and that the disclosure is not limited to the embodiments described in detail below, and that the embodiments described in the examples may be combined as appropriate to form other embodiments that will be apparent to those skilled in the art.

Claims (9)

1. A distributed database system, responsive to a user initiated database access request;
wherein the distributed database system comprises: the system comprises a main controller, a Statefulset object controlled by the main controller, a PDB object and a proxy server;
generating a plurality of Pods by the Statefulset object to form a Pod cluster, limiting a threshold range of the Pod number in the Pod cluster by the PDB object, forming a reference relation between the Statefulset object and the PDB object, acquiring the threshold range based on the reference relation, and adjusting the Pod number to be within the threshold range; the proxy server carries out management request and service request forwarding on the Pod cluster;
the proxy server deploys a service proxy, and the main controller receives the service request and forwards the service request to the service proxy so as to forward the service request to the Pod cluster through the service proxy;
the service agent comprises: a master agent responding to the data writing request and the data reading request forwarded by the master controller and a slave agent responding to the data reading request forwarded by the master controller, wherein the master agent and the slave agent are only exposed to the master controller;
wherein, independently deploy the database container in the Pod.
2. The distributed database system of claim 1, wherein the distributed database system is built based on Kubernetes deploying a deletion policy to perform a deletion operation on the Statefulset object and PDB object synchronously based on the deletion policy.
3. The distributed database system of claim 2, wherein the PDB object generates a maintenance policy by the PDB object to perform maintenance based on the maintenance policy upon receipt of a voluntary interrupt event by the distributed database system; the voluntary interrupt event includes: one or any combination of a Pod maintenance, upgrade event, node deletion event and Pod deletion event.
4. The distributed database system of claim 1, wherein the proxy server deploys a management agent and exposes only to the master controller, receives management requests through the management agent and creates unique access names for each Pod by the domain name system, and monitors the pods for status information and records for each Pod.
5. The distributed database system according to claim 4, wherein the Init container is configured in the Pod, the Init container initializes the database containers in the same Pod to form a state of independently providing database services, a master database container and a plurality of slave database containers are determined between the database containers respectively deployed by the pods based on a master-slave determination policy, and the tag controller reads metadata information of the database containers in the Pod to which the tag controller belongs to identify role information of the Pod in which the database container belongs based on the metadata information.
6. The distributed database system of claim 5 wherein the master agent determines a master database container based on the role information and forwards the data write request and data read request to the master database container determined by the master-slave determination policy, and the slave agent determines a slave data container based on the role information and forwards the data read request to a slave database container determined based on the master-slave determination policy.
7. The distributed database system of claim 5, wherein if a master database container currently providing database services is down, selecting one slave database container from a plurality of slave database containers as the master database container based on the master-slave determination policy.
8. The distributed database system of any of claims 1 to 7, wherein the distributed database system is independently operated in a computing device, the computing device being a physical machine or a cluster of virtual machines.
9. An electronic device, comprising:
a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor;
the processor, when executing the computer program, executes logic comprised in the distributed database system as claimed in any one of claims 1 to 8.
CN202211472755.2A 2022-11-23 2022-11-23 Distributed database system and electronic equipment Active CN115510167B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211472755.2A CN115510167B (en) 2022-11-23 2022-11-23 Distributed database system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211472755.2A CN115510167B (en) 2022-11-23 2022-11-23 Distributed database system and electronic equipment

Publications (2)

Publication Number Publication Date
CN115510167A CN115510167A (en) 2022-12-23
CN115510167B true CN115510167B (en) 2023-05-23

Family

ID=84513945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211472755.2A Active CN115510167B (en) 2022-11-23 2022-11-23 Distributed database system and electronic equipment

Country Status (1)

Country Link
CN (1) CN115510167B (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5999978A (en) * 1997-10-31 1999-12-07 Sun Microsystems, Inc. Distributed system and method for controlling access to network resources and event notifications
CN111651275A (en) * 2020-06-04 2020-09-11 山东汇贸电子口岸有限公司 MySQL cluster automatic deployment system and method
CN113297031A (en) * 2021-05-08 2021-08-24 阿里巴巴新加坡控股有限公司 Container group protection method and device in container cluster
CN114239055A (en) * 2021-11-29 2022-03-25 浪潮云信息技术股份公司 Distributed database multi-tenant isolation method and system

Also Published As

Publication number Publication date
CN115510167A (en) 2022-12-23

Similar Documents

Publication Publication Date Title
EP3745269B1 (en) Hierarchical fault tolerance in system storage
CN109656742B (en) Node exception handling method and device and storage medium
US9792150B1 (en) Detecting site change for migrated virtual machines
EP3648405B1 (en) System and method to create a highly available quorum for clustered solutions
CN111488247B (en) High availability method and equipment for managing and controlling multiple fault tolerance of nodes
CN115510167B (en) Distributed database system and electronic equipment
CN116389233A (en) Container cloud management platform active-standby switching system, method and device and computer equipment
CN112202601B (en) Application method of two physical node mongo clusters operated in duplicate set mode
CN115470041A (en) Data disaster recovery management method and device
US11522966B2 (en) Methods, devices and systems for non-disruptive upgrades to a replicated state machine in a distributed computing environment
US11586592B2 (en) Methods, devices and systems for writer pre-selection in distributed data systems
CN113687935A (en) Cloud native storage scheduling mode based on super-fusion design
CN114615263A (en) Cluster online migration method, device, equipment and storage medium
CN112685130A (en) Virtual machine backup method and device in distributed storage environment and storage medium
WO2016046951A1 (en) Computer system and file management method therefor
US10652125B2 (en) System and method for managing multiple remote-office and branch-office (ROBO) sites
US11271999B2 (en) Flexible associativity in multitenant clustered environments
WO2024021746A1 (en) Data processing method, communication system, and related device
CN117201278A (en) Method for realizing disaster recovery high-availability scene of primary and backup cloud primary application in information creation environment
US20170308542A1 (en) File system configuration data storage
CN116684261A (en) Cluster architecture control method and device, storage medium and electronic equipment
CN115756754A (en) Containerized operation and maintenance method and system for stateful service
CN114296875A (en) Data synchronization method, system and computer readable medium based on fault tolerant system
CN117520053A (en) Database system management method and device based on master-slave replication protocol
CN117632491A (en) GPU cluster management system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant