主权项 |
1. A distributed database (DB) system, comprising:
a plurality of DB nodes, each DB node comprising a processor, a memory, a storage medium, and a network interface for communicating over a communication network; one or more distributed DBs hosted by the plurality of DB nodes, each of the one or more distributed DBs comprising a plurality of DB partitions, wherein each DB partition is a process executed by a processor of a particular DB node representing either a master DB partition or a slave DB partition, wherein the master DB partition is configured to accept data requests, and wherein the slave DB partition is configured to synchronize with the master DB partition; at least one daemon process executed by at least one processor of at least one of the plurality of DB nodes, wherein the at least one daemon process:
accepts data requests and determines which DB partition serves the request; upon a failure of a DB node of the plurality of DB nodes, promotes at least one first slave DB partition hosted by a non-failed DB node to at least one first master DB partition, wherein the at least one first slave DB partition corresponds to at least one second master DB partition hosted by the failed DB node. |