WO2017130377A1 - 計算機システム、及び、データ処理方法 - Google Patents

計算機システム、及び、データ処理方法 Download PDF

Info

Publication number
WO2017130377A1
WO2017130377A1 PCT/JP2016/052642 JP2016052642W WO2017130377A1 WO 2017130377 A1 WO2017130377 A1 WO 2017130377A1 JP 2016052642 W JP2016052642 W JP 2016052642W WO 2017130377 A1 WO2017130377 A1 WO 2017130377A1
Authority
WO
WIPO (PCT)
Prior art keywords
range
upper limit
key range
data amount
message
Prior art date
Application number
PCT/JP2016/052642
Other languages
English (en)
French (fr)
Inventor
裕太朗 加藤
鈴木 隆志
敏之 長谷川
展之 山本
Original Assignee
株式会社日立製作所
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 株式会社日立製作所 filed Critical 株式会社日立製作所
Priority to PCT/JP2016/052642 priority Critical patent/WO2017130377A1/ja
Priority to JP2017544685A priority patent/JP6360634B2/ja
Priority to US15/561,214 priority patent/US10719496B2/en
Publication of WO2017130377A1 publication Critical patent/WO2017130377A1/ja

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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2272Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • 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/22Indexing; Data structures therefor; Storage structures
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • G06F16/24554Unary operations; Data partitioning operations
    • G06F16/24556Aggregation; Duplicate elimination
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries

Definitions

  • the present invention generally relates to a distributed database composed of a plurality of computers.
  • RDBMS Relational DataBase Management System
  • the data is divided into predetermined ranges (for example, key ranges, etc.), and the divided data is arranged on multiple servers, thereby improving the access performance of the entire system.
  • the method is known.
  • KVS Key Value Store
  • a volatile storage medium capable of accessing data at high speed for example, a configuration for storing data in a memory (memory store), a non-volatile recording medium having excellent data storage durability, for example, SSD (Solid State Disk) ) And HDD, etc., various configurations such as a configuration for storing data (disk store) or a configuration in which the above-described configuration is used together.
  • the in-memory type KVS realizes high-speed data access compared to the disk type KVS, but has some drawbacks.
  • the amount of data that can be stored is smaller than that of a disk-type KVS because the memory capacity that can be mounted on one server is smaller than that of an SSD or HDD.
  • the memory is a volatile recording medium, the data on the memory disappears when the server is stopped due to some kind of failure.
  • a system that overcomes the above drawbacks is an in-memory distributed KVS (hereinafter, distributed KVS).
  • the distributed KVS is a KVS configured by configuring a cluster from a plurality of servers and on a memory of a server included in the cluster.
  • a memory capacity that cannot be held by one server can be secured.
  • the same data is duplicated between a plurality of servers, so that even if some servers are stopped, the disappearance of the data can be avoided.
  • Each server constituting the distributed KVS is in charge of a range that does not overlap with other servers, and stores a set of data (hereinafter referred to as a partition) included in the range. Furthermore, each server stores a copy of the partition managed by the other server.
  • the distributed KVS there is no single point of failure because no special server such as a management server exists or is multiplexed. In other words, even if a failure occurs in an arbitrary server, the processing can be continued based on the replicated partition of the other server, and the computer system does not stop. Therefore, the distributed KVS also ensures fault tolerance.
  • a scale-out of adding a new server to the cluster as one of the countermeasures when the load on the server increases or the amount of data that can be stored disappears due to an increase in the amount of data stored in the distributed KVS.
  • a process for changing the range that the server is in charge of hereinafter referred to as rebalancing process
  • rebalance processing is also performed when data bias is eliminated as one of the countermeasures when the system throughput decreases due to the data being biased to only some servers.
  • Patent Document 1 As described above, the techniques described in Patent Documents 1 and 2 are known for the rebalancing process.
  • Patent Document 1 a new partition after rebalancing is prepared for the existing range and the existing partition corresponding to the existing range, data is copied from the existing partition to the new partition, and the existing range and the corresponding existing partition are copied after the copying is completed. It is described that a rebalance process can be realized by performing a process of switching access from a partition to a new range and a corresponding new partition.
  • an object of the present invention is to improve the ease of operation and reliability of the distributed KVS. Other objects will become apparent in the description of the examples.
  • a computer system includes a plurality of computer devices, the plurality of computer devices include a processor and a memory, and executes a plurality of nodes for configuring a distributed KVS, and the plurality of nodes include manageable data.
  • the upper limit data amount of the new key range and the upper limit data amount of the existing key range The upper limit data amount of the existing key range is reduced so that the sum of the above and the maximum amount that is based on the memory capacity of the computer device does not exceed the maximum amount.
  • the operability and reliability of the computer system constituting the distributed KVS can be improved.
  • the figure which shows the structural example of the computer system which concerns on a present Example The figure which shows the structural example of a computer apparatus.
  • summary of a rebalance process The figure which shows the example of state transition information.
  • the figure which shows the example of process control information The figure which shows the example of resource information.
  • the flowchart which shows the process example of the numbering part of a configuration management process.
  • the flowchart which shows the process example of the process number control part of a range process.
  • the flowchart which shows the process example of the state control part of a range process.
  • the flowchart which shows the process example of the message
  • the flowchart which shows the process example of the resource check part of a range process.
  • the figure for demonstrating the example of a rebalance process The figure for demonstrating the example of a rebalance process.
  • the figure for demonstrating the example of a rebalance process The figure for demonstrating the example of a rebalance process.
  • the figure for demonstrating the example of a rebalance process The figure for demonstrating the example of a rebalance process.
  • the figure for demonstrating the example of a rebalance process The figure for demonstrating the example of a rebalance process.
  • the figure for demonstrating the example of a rebalance process The figure for demonstrating the example of a rebalance process. The figure for demonstrating the example of a rebalance process. The figure for demonstrating the example of a rebalance process. The figure for demonstrating the example of a rebalance process. The figure for demonstrating the example of a scale-out process. The figure for demonstrating the example of a scale-out process. The figure for demonstrating the example of a scale-out process. The figure for demonstrating the example of a scale-out process. The figure for demonstrating the example of a scale-out process. The figure for demonstrating the example of a scale-out process. The figure for demonstrating the example of a scale-out process. The figure for demonstrating the example of a scale-out process. The figure for demonstrating the example of a scale-out process. The figure for demonstrating the example of a scale-out process. The figure for demonstrating the example of a scale-out process. The figure for demonstrating the example of a
  • the figure for demonstrating the example of a scale-in process The figure for demonstrating the example of a scale-in process. The figure for demonstrating the example of a scale-in process. The figure for demonstrating the example of a scale-in process. The figure for demonstrating the example of a scale-in process. The figure for demonstrating the example of a scale-in process. The figure for demonstrating the example of a scale-in process. The figure for demonstrating the example of a scale-in process. The figure for demonstrating the example of prevention of double implementation of a message
  • telegram in a rebalance process The figure for demonstrating the example of prevention of double implementation of a message
  • telegram in a rebalance process The figure for demonstrating the example of prevention of double implementation of a message
  • telegram in a rebalance process The figure for demonstrating the example of prevention of double implementation of a message
  • FIG. 1 shows a configuration example of a computer system according to this embodiment.
  • the computer system 1 includes a rebalance device 20, a scale-in device 22, a scale-out device 24, an alive monitoring device 30, a client device 40, and a plurality of computer devices 10, which are bidirectional via a network 50. It is connected so that it can communicate.
  • the plurality of computer apparatuses 10 have a plurality of nodes 110 (see FIG. 2), and the plurality of nodes 110 cooperate to configure a distributed KVS.
  • Each node 110 manages a key range (sometimes simply referred to as “range”) indicating a part of the entire key range. In order to improve fault tolerance, multiple nodes 110 may manage the same key range.
  • the plurality of computer apparatuses 10 may be referred to as “computer clusters”.
  • the rebalancing device 20 changes the key range so that the data amount held by each key range is equalized when the data amount held by each key range is biased (referred to as “rebalance processing”). ).
  • the scale-in device 22 is a device that performs processing for deleting at least one node 110 from the plurality of nodes 110 (referred to as “scale-in processing”).
  • the scale-out device 24 is a device that performs processing for adding at least one node 110 to a plurality of nodes 110 (referred to as “scale-out processing”).
  • the rebalance device 20, the scale-in device 22, and the scale-out device 24 may be one device.
  • the life and death monitoring device 30 is a device that monitors the life and death of each device. For example, the alive monitoring device 30 periodically transmits a PING to each device, and if a response is not returned within the first time (timeout), it is determined that the device is stopped. You can do it. Then, the alive monitoring device 30 may instruct the standby device corresponding to the device determined to be stopped to take over the processing.
  • the client device 40 uses a distributed KVS configured by a plurality of computer devices 10. For example, the client device 40 can request the computer cluster to write, read, and delete data.
  • the computer cluster that has received the data write request may calculate a key from the data and write the key and data to the node 110 that manages the range including the key.
  • the computer cluster that has received the data acquisition request may calculate a key from the data, read the data corresponding to the key from the node 110 that manages the range including the key, and return the data to the client device 40. The same applies to deletion.
  • FIG. 2 shows a configuration example of the computer apparatus 10.
  • the computer apparatus 10 includes a processor 102, a main storage device 104, an auxiliary storage device 103, and a network I / F device 101.
  • the processor 102 executes a program stored in the main storage device 104.
  • the auxiliary storage device 103 stores various information. Examples of the auxiliary storage device 103 are an HDD, an SSD, and the like.
  • the network I / F device 101 is a device for the computer apparatus 10 to communicate with other apparatuses via the network 50. An example of the network I / F device 101 is an Ethernet card or the like.
  • the main storage device 104 stores a program executed by the processor 102 and information necessary for executing the program. Examples of the main storage device 102 are SRAM, DRAM, and the like. In this embodiment, a distributed KVS is constructed in the main storage device 104, but a disk store (not shown) for constructing a distributed KVS in the auxiliary storage device 103 may be constructed.
  • the main storage device 104 stores a program for realizing the node 110.
  • a single computer apparatus 10 may have a plurality of nodes 110.
  • the node 110 includes a program for realizing a configuration management process 130, a copy unit 160, and a plurality of range processes 170.
  • the configuration management process 130 may include a primitive distribution unit 131, a message saving unit 132, a message execution unit 133, a numbering unit 134, an operation issuing unit 135, and numbering information 400.
  • the range process 170 includes a primitive distribution unit 171, a process number control unit 174, a resource check unit 175, a message saving unit 172, a state control unit 176, a message execution unit 173, a data store unit 177, group information 600, resource information 500, Processing control information 700 and state transition information 800 may be included.
  • a primitive distribution unit 171 a process number control unit 174, a resource check unit 175, a message saving unit 172, a state control unit 176, a message execution unit 173, a data store unit 177, group information 600, resource information 500, Processing control information 700 and state transition information 800 may be included.
  • the range process 170 is a processing unit responsible for one range.
  • the range process 170 is a system (also called a state machine or automaton) that expresses the behavior of an object using "state” and “event”, and holds the current state inside, and event input from the outside If so, the current state is “state transitioned” to the next state in accordance with a predetermined rule.
  • KVS can be treated as a set of range processes 170 for each key.
  • the number of range processes 170 becomes enormous, which is not realistic.
  • the key data length is 4 bytes
  • the number of range processes 170 required is about 4.2 billion than the number of keys that can be expressed in 4 bytes (2 to the 32nd power).
  • the range represents a range of hash values.
  • the hash value is calculated from the key of each data, and the range process 170 in charge of the range including the calculated hash value stores the data. This method is called the consistent hashing method.
  • methods such as the Range method and the List method may be adopted.
  • the range process 170 When the distributed KVS is to be realized by the range process 170, it is necessary to cause the plurality of range processes 170 to execute the same behavior in order to maintain data consistency among the plurality of range processes 170 that replicate data. is there.
  • a set of range processes 170 that execute the same behavior to duplicate data is called a “group”.
  • the atomic distribution unit 171 In order for all the range processes 170 belonging to the group to execute the same behavior, it is necessary to input the same event to all the range processes 170 belonging to the group in the same input order. Therefore, the atomic distribution unit 171 is used to determine the order in which the event is input.
  • the atomic distribution unit 171 of the range process 170 can communicate with the atomic distribution unit 171 of the range process 170 belonging to the same group. Information about the group is stored in the group information 600. And the same message
  • telegram is delivered in the same order within a group, for example using a distributed agreement algorithm.
  • This distribution method is referred to as atomic distribution (otherwise, it may be referred to as full-order broadcast ⁇ or atomic broadcast ⁇ ).
  • the message execution unit 173 retrieves a message from the message storage unit 172, and performs various processes corresponding to the message on the data managed by the data store unit 177.
  • the various processes include, for example, data update, lowering of the upper limit data amount, raising operation of the upper limit data amount, initialization operation, and the like.
  • the configuration management process 130 performs various operations based on messages received from the alive monitoring device 20, the rebalance device 20, or the like.
  • the primitive distribution unit 131 of the configuration management process 130 can communicate with the primitive distribution unit 171 included in all the configuration management processes 130 and atomically distributes to all the configuration management processes 130.
  • the telegram saving unit 132 temporarily stores the telegrams delivered primitively by the primitive delivery unit 131 using the FIFO method.
  • the message execution unit 133 takes out a message from the message storage unit 172, and performs various processes corresponding to the message.
  • the various processes are, for example, a configuration change process and a numbering process. Details will be described later.
  • the numbering unit 134 issues a processing number. Details will be described later.
  • the operation issuing unit 135 gives a processing number to the message transmitted by the message transmitting unit 211 or the message executing unit 133 of the configuration management process 130.
  • FIG. 3 shows a configuration example of the rebalancing device 20.
  • the rebalancing device 20 includes a processor 202, a main storage device 204, an auxiliary storage device 203, and a network I / F device 201.
  • the processor 202 executes a program stored in the main storage device 204.
  • the auxiliary storage device 203 stores various information. Examples of the auxiliary storage device 203 are an HDD, an SSD, and the like.
  • the network I / F device 201 is a device for the rebalance device 20 to communicate with other devices via the network 50. An example of the network I / F device 201 is an Ethernet card or the like.
  • the main storage device 204 stores a program executed by the processor 202 and information necessary for executing the program. Examples of the main storage device 204 are SRAM, DRAM, and the like.
  • the main storage device 204 may store programs for realizing the functions of the configuration information management unit 214, the performance monitoring unit 215, the message transmission unit 211, the numbering unit 213, and the operation issuing unit 212.
  • the configuration information management unit 214 manages configuration information related to the configuration of the node 110 and the range process 170 included in the node 110.
  • the performance monitoring unit 215 periodically collects performance indexes of each group. Then, the performance monitoring unit 215 determines whether or not the performance index is biased between groups based on the collection result. If the performance monitoring unit 215 determines that a bias has occurred, the performance monitoring unit 215 causes the message transmission unit 211 to transmit a message related to the rebalancing process.
  • the message transmission unit 211 transmits a message to the computer cluster in order to perform the rebalancing process.
  • These messages may be, for example, an initialization message, an upper limit data amount increase message, an upper limit lower message, an initialization message, and a message for operating the range process 170.
  • the operation of the range process 170 includes, for example, an empty range creation operation, a range division operation, a range copy operation, and a range merge operation. Details will be described later.
  • the numbering message is a message that requests the computer cluster to assign a processing number.
  • the numbering message may be issued by a numbering unit 213 described later.
  • the upper limit data amount increase message is a message that requests the computer cluster to increase the upper limit data amount of the specified key range.
  • the upper limit data amount reduction message is a message that requests the computer cluster to reduce the upper limit data amount of the specified key range.
  • the configuration change message is a message sent when the alive monitoring device 30 detects that the node 110 is down, and is a message requesting to disconnect the down node 110 from the computer cluster.
  • the data update message is a message that requests the computer cluster to update (write, read, move, delete, etc.) the specified data.
  • the initialization message is a message that requests the computer cluster to initialize the state in the state transition information 800 prior to the start of the rebalancing process.
  • the numbering unit 213 issues a message requesting numbering to the computer cluster (“numbering message”). Then, the numbering unit 213 manages the processing number issued from the computer cluster for the numbering message.
  • this processing number and operation issuing unit 212 for example, when the active rebalancing device 20 and the standby rebalancing device 20 transmit the same message to the computer cluster due to some abnormal state, the computer cluster However, it is possible to prevent these same messages from being executed twice.
  • FIG. 4 is a diagram for explaining the outline of the rebalancing process.
  • the hash value is obtained between 1 and 2000, and all data handled by the system can be stored in the range of 1 to 2000.
  • a group A that processes data represented by a circle included in a range ⁇ of 1 to 1000
  • a group B that processes data represented by a square included in a range ⁇ of 1001 to 1700
  • the maximum data amount that each node can hold is “200 MB”
  • the upper limit data amounts of the ranges ⁇ , ⁇ , and ⁇ are each “100 MB”.
  • the load is uneven among the groups. Therefore, in order to eliminate the bias by narrowing the range of the range ⁇ and widening the range of the range ⁇ , the steps of creating the moving group, dividing the group, moving the moving group, merging the group, and deleting the moving group are performed. The rebalancing process will be described.
  • a temporarily used moving group D is created for a node including group B and responsible for an empty range having no range range. Specifically, since the node A and the node C include a range belonging to the group B, the movement group D is created in the node A and the node C.
  • a group division operation is performed, and the range B of group B and the range ⁇ of moving group D are updated. Further, when performing the group division operation, the data stored in the group B in the range that the moving group D is newly in charge of is moved from the group B to the moving group D.
  • the data handled by the movement group D is represented by diamonds in the figure.
  • the range process belonging to the moving group D held by the node C and the data held by the range process are copied to the node B, and the copied range process is It belongs to the moving group D (“copy” in the figure).
  • copying a range process belonging to a certain group to another node and belonging to the same group is called intra-group process copy processing.
  • the copied group D (range ⁇ ) data exists in the node B. That is, the sum of the upper limit data amount “100 MB” of the range ⁇ , the upper limit data amount “100 M” of the range ⁇ , and the upper limit data amount “38 MB” of the range ⁇ is the maximum data amount “200 MB” that the node B can hold. It has been exceeded. This embodiment prevents such a problem from occurring.
  • the range process belonging to the moving group D existing on the node C that becomes an obstacle in the group merging operation is deleted.
  • deleting a part of a range process belonging to a certain group may be referred to as in-group process deletion processing.
  • the group merging operation is performed as in R3, and the range ⁇ of the group A and the range ⁇ of the moving group D are updated. Further, when performing the group merging operation, the data stored in the moving group D in the range newly assigned to the group A is moved from the moving group D to the group A.
  • the range ⁇ of group A is changed from “1 to 1000” to “1 to 1500” and the range ⁇ of group B is changed from “1001 to 1700” to “1501 to 1700”.
  • the group split operation and group merge operation are realized by a process called “range update process”. Specifically, in the group division operation, the range ⁇ handled by the group B and the range ⁇ handled by the movement group D are changed from “1001 to 1700” and “NULL” to “1501 to 1700” and “1001 to 1501”. It is realized by updating to "”. Further, the group merging operation changes the range ⁇ handled by the moving group D and the range ⁇ handled by the group A from “1001 to 1501” and “1 to 1000” to “NULL” and the range “1 to 1500”. Realize by updating.
  • FIG. 5 shows an example of the state transition information 800.
  • the state transition information 800 includes information about the correspondence between the state of the range process 170 and the operations that can be executed by the range process 170 in that state.
  • FIG. 5 shows that, in the initial state, an operation for increasing the upper limit data amount (upper limit data amount increasing operation) and an operation for decreasing the upper limit data amount (upper limit data amount decreasing operation) can be executed.
  • an operation for increasing the upper limit data amount upper limit data amount increasing operation
  • an operation for decreasing the upper limit data amount upper limit data amount decreasing operation
  • FIG. 6 shows an example of the process control information 700.
  • the processing control information 700 includes the processing number (final processing number) of the message last received by the range process 170 from the rebalancing device 20 and the like, and information on the current state of the range process 170.
  • the final process number is used to prevent double execution of the same message as described above.
  • the current state of the range process 170 is used to determine the operations that the range process 170 can currently perform.
  • the value that the current state of the node 110 can take may be a value registered in the state of the node 110 in the state transition information 800.
  • FIG. 7 shows an example of resource information 500.
  • the resource information 500 includes information about the current upper limit data amount of the range and the data amount (retained data amount) currently held in the range.
  • FIG. 8 shows an example of the issue number information 400.
  • the numbering information 400 includes information on the processing number that the numbering unit 134 of the configuration management process 130 has issued to the rebalancing device 20 or the like.
  • FIG. 9 is a flowchart showing a processing example of the rebalancing device 20.
  • the rebalancing device 20 determines that rebalancing is necessary by the performance monitoring unit 215, the rebalancing device 20 performs the following processing.
  • the numbering unit 213 transmits a numbering message to the configuration management process 130.
  • the numbering unit 213 receives the processing number corresponding to the rebalancing process from the configuration management process 130 and registers it. This processing number may be given to all messages in the following rebalance processing through the operation issuing unit 212. Then, the process proceeds to S202.
  • the message transmission unit 211 transmits an initialization message to the range process 170. Then, the process proceeds to S204.
  • the message transmission unit 211 cooperates with the range process 170 to create an empty temporary range in the node 110 that manages the source range. Then, the process proceeds to S206.
  • the message transmission unit 211 transmits a message for lowering the upper limit data amount of the movement source range and the movement destination range to the range process 170. Then, the process proceeds to S208.
  • the message transmission unit 211 cooperates with the range process 170 to execute range division of the source range. For example, the operation issuing unit moves a part of the data of the movement source range to the temporary range created in S204.
  • the message transmitting unit 211 copies the temporary range to the node 110 that manages the destination range in cooperation with the range process 170. Then, the process proceeds to S212.
  • the message transmission unit 211 transmits an upper limit data amount increase message for the movement source range and the movement destination range to the range process 170. Then, this process ends.
  • FIGS. 18A to 18I and FIGS. 21A to 21H Specific examples of this processing are shown in FIGS. 18A to 18I and FIGS. 21A to 21H.
  • FIG. 10 is a flowchart showing a processing example of the scale-out device 24.
  • the scale-out device 24 performs the following processing when adding the new node 110 to the computer cluster (S300).
  • the numbering unit 213 transmits a numbering message to the configuration management process 130.
  • the numbering unit 213 receives the processing number corresponding to the scale-out processing from the configuration management process 130 and registers it. This processing number may be given to all messages in the scale-out processing below through the operation issuing unit 212. Then, the process proceeds to S304.
  • the message transmission unit 211 cooperates with the range process 170 to generate an empty destination range in the node 110 that manages the source range. Then, the process proceeds to S308.
  • the message transmission unit 211 transmits a message for lowering the upper limit data amount of the movement source range to the range process 170. Then, the process proceeds to S310.
  • the message transmission unit 211 cooperates with the range process 170 to perform range division of the source range. For example, the operation issuing unit 212 moves some data of the movement source range to the movement destination range created in S306. Then, the process proceeds to S312.
  • the message transmission unit 211 cooperates with the range process 170 to copy the destination range to the new node 110. Further, the operation issuing unit 212 copies the movement destination range to the new node 110 in cooperation with the range process 170.
  • the message transmission unit 211 cooperates with the range process 170 to delete the range (unnecessary range) that has become redundant due to the range copy in S312. Then, the process proceeds to S214.
  • the message transmission unit 211 transmits an upper limit data amount increase message for the movement source range and the movement destination range to the range process 170. Then, this process ends.
  • FIG. 11 is a flowchart showing a processing example of the scale-in device 22.
  • the scale-in device 22 performs the following processing when deleting the existing node 110 from the computer cluster.
  • the numbering unit 213 transmits a numbering message to the configuration management process 130.
  • the numbering unit 213 receives the processing number corresponding to the scale-in processing from the configuration management process 130 and registers it. This processing number may be given to all messages in the scale-in processing below through the operation issuing unit 212. Then, the process proceeds to S402.
  • the message transmission unit 211 transmits an initialization message to the range process 170. Then, the process proceeds to S404.
  • the message transmission unit 211 transmits a message for lowering the upper limit data amount of the movement source range and the merge destination range to the range process 170. Then, the process proceeds to S406.
  • the message transmission unit 211 copies the movement source range to the node 110 that manages the movement destination range in cooperation with the range process 170. Then, the process proceeds to S408.
  • the message transmission unit 211 cooperates with the range process 170 to merge the destination range with the destination range. Then, the process proceeds to S410.
  • the message transmission unit 212 transmits a message for increasing the upper limit value data amount of the destination range to the range process 170. Then, the process proceeds to S414.
  • FIG. 12 is a flowchart showing a processing example of the message execution unit 133 of the configuration management process 130.
  • the message execution unit 133 determines whether or not the received message is a configuration change message. If the determination result is “YES”, the process proceeds to S504, and if “NO”, the process proceeds to S502.
  • the message execution unit 133 determines whether or not the received message is a numbered message. If the determination result is “YES”, the process proceeds to S510, and if “NO”, the process is terminated.
  • the message execution unit 133 determines whether the configuration management process 130 of the node 110 including the range process 170 that has received the initialization message is a representative configuration management process 130. If the determination result is “YES”, the process proceeds to S512, and if “NO”, the process ends.
  • the message execution unit 133 transmits an upper limit data amount increase message to the range process 170, and ends this process.
  • a processing number may be given through the operation issuing unit 135.
  • the numbering unit 134 issues a processing number corresponding to the received numbering message, and ends this processing. Details of the processing of the numbering unit 134 will be described later (see FIG. 13).
  • FIG. 13 is a flowchart illustrating a processing example of the numbering unit 134 of the configuration management process 130.
  • the numbering unit 134 issues a processing number larger than the processing number included in the numbering information 400. Then, the process proceeds to S604.
  • the numbering unit 134 registers the processing number issued in S602 in the numbering information 400. Then, the process proceeds to S606.
  • the numbering unit 134 determines whether or not it is the node 110 that has received the numbering message by the primitive distribution unit 131. If the determination result is “YES”, the process proceeds to S608, and “NO”. If so, this process ends.
  • the numbering unit 134 returns the processing number numbered in S602 to the numbering message transmission source (for example, the rebalancing device 20). Then, this process ends.
  • FIG. 14 is a flowchart showing a processing example of the processing number control unit 174 of the range process 170.
  • the process number control unit 174 determines whether or not the process number of the message extracted in S700 is equal to or greater than the final process number registered in the process control information 700. If the determination result is “YES”, the process number control unit 174 proceeds to S704, and if “NO”, the process ends.
  • the processing number control unit 174 updates the final processing number to the processing number of the acquired message. Then, the process proceeds to S706.
  • the process number control unit 174 passes the message extracted in S700 to the state control unit 176, and ends this process.
  • FIG. 15 is a flowchart showing a processing example of the state control unit 176 of the range process 170.
  • the state control unit 176 refers to the state transition information 800, and determines whether or not the message received in S800 can be executed in the current state of the process control information 700. If the determination result is “YES”, the state control unit 176 proceeds to S804, and if “NO”, the process is terminated.
  • the state control unit 176 passes the message received in S800 to the message execution unit 173, and ends this process.
  • FIG. 16 is a flowchart showing a processing example of the message execution unit 173 of the range process 170.
  • the message execution unit 173 determines whether or not the message is a data update message. If the determination result is “YES”, the process proceeds to S904, and if “NO”, the process proceeds to S910.
  • the message execution unit 173 determines whether the message is an upper limit data amount increase message. If the determination result is “YES”, the process proceeds to S912, and if “NO”, the process proceeds to S920.
  • the message execution unit 173 determines whether or not the message is an upper limit data amount reduction message. If the determination result is “YES”, the process proceeds to S922, and if “NO”, the process proceeds to S930.
  • the message execution unit 173 determines whether or not the message is an initialization message. If the determination result is “YES”, the process proceeds to S932, and if “NO”, the process ends.
  • the message execution unit 173 stores the data in the data store unit 177, and ends this processing.
  • the message execution unit 173 operates to increase the upper limit data amount of the resource information 500. For example, the upper limit data amount of the resource information 500 is changed to a value specified by the upper limit data amount raising message. Then, the process proceeds to S914.
  • the message execution unit 173 changes the current state of the process control information 700 to the “upper limit data amount increase state”, and ends this process.
  • the message execution unit 173 operates to lower the upper limit data amount of the resource information 500. For example, the upper limit data amount of the resource information 500 is changed to a value specified by the upper limit data amount lowering message. Then, the process proceeds to S924.
  • the message execution unit 173 changes the current state of the processing control information 700 to the “upper limit data amount reduction state”, and ends this processing.
  • FIG. 17 is a flowchart illustrating a processing example of the resource check unit 175 of the range process 170.
  • the resource check unit 175 acquires the upper limit data amount from the resource information 500.
  • the resource check unit 175 determines whether the upper limit data amount acquired in S1000 is not exceeded even if the data of the received data update message is registered in the range. If the determination result is “YES”, the resource check unit 175 proceeds to S1004, and if “NO”, the process is terminated.
  • the resource check unit 175 passes the data update message to the primitive delivery unit 171 and ends this process.
  • FIG. 18A to FIG. 18I are diagrams for explaining an example of the rebalancing process in the present embodiment.
  • Node A manages Range 1 and Range 4
  • Node B manages Range 1 and Range 2
  • Node C manages Range 2 and Range 3
  • Node D manages Range 3 and Range 4.
  • a rebalance process is performed to move a part of the data in the range 3 to the range 2.
  • the maximum memory amount of each node is “200”, and the monitoring upper limit (corresponding to the upper limit data amount) of each range is “100”.
  • FIG. 18B An empty temporary range 3.5 is created in the node C and the node D that manage the source range 3 by the process of S204.
  • the upper limit of monitoring of the empty temporary range 3.5 is set to “38”.
  • FIG. 18C By the process of S206, a message for lowering the upper limit data amount of the movement source range 3 and the movement destination range 2 (a message for changing the monitoring upper limit to “62”) is transmitted, and the movement of the movement source range 3 and the movement destination range 2 The monitoring upper limit is changed to “62”.
  • the value of the monitoring upper limit may be determined so that the sum of the monitoring upper limits of all ranges managed by the node does not exceed the maximum memory amount “200” of the node.
  • FIG. 18D A part of the data in the movement source range 3 is moved to the temporary range 3.5 by the process of S208.
  • the temporary range 3.5 is copied to the node B that manages the destination range 2 by the process of S210. At this time, there are range 1, range 2, and range 3.5 in node B, but the upper limit of monitoring of range 2 is lowered to “62” in FIG. Does not exceed the maximum memory amount “200” of the node B. That is, resource overflow is prevented.
  • FIG. 18H By the process of S216, an upper limit data amount increase message for the movement source range 3 and the movement destination range 2 (message for changing the monitoring upper limit to “100”) is transmitted, and the movement source range 3 and the movement destination range 2 The monitoring upper limit is changed to “100”. Thereby, the monitoring upper limit of the ranges 2 and 3 once lowered in FIG. 18C is restored.
  • the client device 40 may transmit a data update message to each range. The same applies to scale-out and scale-in.
  • 19A to 19H are diagrams for explaining an example of the scale-out process in the present embodiment.
  • FIG. 19A In a configuration in which node A manages range 1 and range 4, node C manages range 1 and range 3, and node D manages range 3 and range 4, node B is added to the computer cluster. Perform scale-out processing to be added.
  • the maximum memory amount of each node is “200”, and the monitoring upper limit of each range is “100”.
  • node B is added to the computer cluster.
  • FIG. 19C In the process of S306, an empty destination range 3.5 is created in the node C and the range 4 that manage the source range 3.
  • the upper limit of monitoring of the destination range 3.5 is “38”.
  • FIG. 19D By the processing of S308, the upper limit data amount lowering message transmission processing of the movement source range 3 is performed, and the monitoring upper limit of the movement destination range 3 is changed to “62”.
  • FIG. 19E A part of the data in the movement source range 3 is moved to the movement destination range 3.5 by the process of S310. At this time, there are range 1, range 3, and range 3.5 in node C, but since the upper limit of monitoring of range 3 is lowered to “62” in FIG. 19D, the upper limit of monitoring of these ranges is set. The total does not exceed the maximum memory amount “200” of the node C. The same applies to node D. That is, resource overflow is prevented.
  • the destination range 3.5 is copied to the additional node B by the processing of S312. Further, the range 1 of the node A may be copied to the additional node B as necessary so that the data amount is equalized as a whole.
  • FIG. 19H By the process of S316, the upper limit data amount increase message of the movement source range 3 and the movement destination range 3.5 (message for changing the monitoring upper limit to “100”) is transmitted, and the movement source range 3 and the movement destination range The monitoring upper limit of 3.5 is changed to “100”. Thereby, the monitoring upper limit of the movement source range 3 once lowered in FIG. 19E is restored. Further, the monitoring upper limit of the movement destination range 3.5 created in FIG. 19C increases to “100”.
  • 20A to 20G are diagrams for explaining an example of the scale-in process in the present embodiment.
  • Node A manages range 1 and range 4
  • node B manages range 1 and range 2
  • node C manages range 2 and range 3
  • node D manages range 3 and range 4.
  • the scale-in process for separating the node B from the computer cluster is performed.
  • the maximum memory amount of each node is “200”, and the monitoring upper limit of each range is “100”.
  • FIG. 20B By the processing of S404, a message for lowering the upper limit data amount of the movement source range 2 and the movement destination range 3 (message for changing the monitoring upper limit to “50”) is transmitted, and the movement of the movement source range 2 and the movement destination range 3 Change the monitoring upper limit to “50”.
  • the source range 2 is copied to the node D that manages the destination range 3 by the process of S406.
  • the range D, the range 3 and the range 4 exist in the node D, but the upper monitoring limit of the range 3 and the range 4 is lowered to “50” in FIG. Of the maximum memory amount “200” of the node D does not exceed. That is, resource overflow is prevented.
  • the range 1 managed by the node B to be deleted may be copied to the node C in order to ensure redundancy.
  • FIG. 20D The source range 2 is merged with the destination range 3 by the processing of S408.
  • FIG. 20E The movement source range 2 that has become unnecessary is deleted by the processing of S410.
  • FIG. 20F By the process of S412, a message for increasing the upper limit data amount of the merge range 3 is transmitted, and the monitoring upper limit of the merged data amount is changed to “100”. Thereby, the monitoring upper limit of the movement destination range 3 once lowered in FIG. 20B is restored.
  • FIG. 20G The node B to be deleted is deleted from the computer cluster by the processing of S414.
  • FIGS. 21A to 21H are diagrams for explaining an example in which double execution of a message is prevented in the rebalancing process.
  • Node A manages range 1 and range 4
  • node B manages range 1 and range 2
  • node C manages range 2 and range 3
  • node D manages range 3 and range 4.
  • the active rebalancing device 20 performs a rebalancing process for moving a part of the data in the range 3 to the range 2.
  • the maximum memory amount of each node is “200”, and the monitoring upper limit of each range is “100”.
  • the numbering message is transmitted to the configuration management process 130 by the process of S200 of the active rebalancing device 20.
  • the configuration management process 130 that has received the numbering message issues a processing number “1” through the processing of S600 to S608, and transmits it to the active rebalancing device 20. Also, the configuration management process 130 registers the issued processing number “1” in the numbering information 400. The active rebalancing device 20 that has received the process number “1” holds the process number “1”.
  • the upper limit data amount lowering message (the monitoring upper limit is “62”) including the processing number “1” being held and the movement source range 2 and the movement destination range 3. Message to be changed to.
  • the processing number 1 of the upper limit data amount reduction message is executed because it is the same as the processing number “1” being held in the numbering information 400 by the configuration management process 130 (the determination result in S702 is “YES”). That is, the monitoring upper limit is changed to “62”.
  • the movement source range 2 and the movement destination range 3 are associated with the process number “1”.
  • FIG. 21D Assume that the life and death monitoring device 30 erroneously determines that the active rebalancing device 20 has stopped.
  • An example of erroneous determination is a case where the processing load of the active rebalancing device 20 is high and the PING response to the alive monitoring device 30 is delayed (timed out). In this case, the alive monitoring device 30 instructs the standby rebalancing device 20 to switch processing.
  • the standby-system rebalancing device 20 transmits a numbering message to the configuration management process 130 as in FIG. 21A.
  • the issuer 134 of the configuration management process 130 that has received the numbering message issues, for example, a process number “2” larger than the process number “1” stored in the numbering information 400, and rebalances the standby system. Transmit to device 20.
  • the configuration management process 130 registers the issued processing number “2” in the numbering information 400.
  • the standby rebalancing device 20 that has received the process number “2” holds this process number “2”.
  • FIG. 21F By the process of S206 of the standby-system rebalancing device 20, as in FIG. 21C, the upper limit data amount lowering messages (monitoring) of the movement source range 2 and the movement destination range 3 including the process number 2 being held are monitored. A message for changing the upper limit to “62”) is transmitted. This upper limit data amount lowering message is executed because it is the same as the processing number 2 being held in the calling number information 400 by the configuration management process 130 (the determination result in S702 is “YES”). That is, the monitoring upper limit is similarly changed to “62”. The movement source range 2 and the movement destination range 3 are associated with the process number “2”.
  • FIG. 21G Here, the active rebalancing device 20 that has not actually stopped attempts to continue the processing after S206 (that is, the processing of S208 to S216) performed in FIG. 21C.
  • S216 an upper limit data amount increase message for the movement source range 2 and the movement destination range 3 (message for changing the management upper limit to “100”) including the process number “1” being held is transmitted.
  • the processing number “1” of the upper limit data amount raising message is not executed because it is smaller than the processing number “2” associated with the ranges 2 and 3 (the determination result in S702 is “NO”). That is, double implementation of the message is prevented, and the monitoring upper limit remains “62”.
  • the standby-system rebalancing device 20 also tries to continue the processing after S206 (that is, the processing of S208 to S216) performed in FIG. 21F.
  • S216 an upper limit data amount increase message for the movement source range 2 and the movement destination range 3 (message for changing the management upper limit to “100”) including the process number “2” being held is transmitted. Since the processing number “2” of this upper limit data amount raising message is the same as the processing number “2” associated with the ranges 2 and 3 (the determination result in S702 is “YES”), it is executed. That is, the monitoring upper limit is changed to “100”.
  • Computer device 20 Rebalance device 22: Scale-in device 24: Scale-out device 30: Alive monitoring device 40: Client device 110: Node 130: Configuration management process 170: Range process

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

計算機システムは分散KVSを構成するための複数のノードを含み、複数のノードは、管理可能なデータ量の上限である上限データ量がそれぞれに設定されている複数のキーレンジを有し、新規のキーレンジを作成する場合、その新規のキーレンジの上限データ量と既存のキーレンジの上限データ量との合計が計算機装置のメモリの容量に基づく量である最大量を超えないように、既存のキーレンジの上限データ量を下げる。

Description

計算機システム、及び、データ処理方法
 本発明は、概して、複数の計算機から構成される分散データベースに関する。
 近年、Webを用いたアプリケーションを実行する計算システムにおいてデータ量が爆発的に増大しており、複数のサーバにデータを分散させることによって、データへのアクセス性能を向上させるシステムが知られている。例えば、RDBMS(Relational DataBase Management System)では、データを所定のレンジ(例えば、キーレンジなど)毎に分割し、分割されたデータを複数のサーバに配置することによって、システム全体のアクセス性能を向上させる方法が知られている。
 また、キャッシュサーバ等に用いられるシステムとして、KVS(Key Value Store)等のNoSQL(Not Only SQL)データベースが知られている。KVSには、データ(バリュー)と、データの識別子(キー)とがペアとなったレコードが複数格納される。
 KVSでは、データに高速にアクセス可能な揮発性の記憶媒体、例えばメモリに、データを格納する構成(メモリストア)、データ格納の永続性に優れる不揮発性の記録媒体、例えば、SSD(Solid State Disk)やHDD等に、データを格納する構成(ディスクストア)、又は、前述したものを併用する構成等の種々の構成がとられている。
 インメモリ型KVSは、ディスク型KVSに比べて、高速なデータアクセスを実現するが、いくつか欠点もある。第一に、物理的制約などにより、SSDやHDDに比べて一台のサーバに搭載可能なメモリ容量が小さいため、ディスク型KVSに比べて格納可能なデータ量が小さくなってしまう。第二に、メモリは揮発性の記録媒体であるため、何らかの障害で、サーバが停止するとメモリ上のデータが消滅してしまう。
 上記欠点を克服したシステムが、インメモリ型分散KVS(以下、分散KVS)である。分散KVSは、複数のサーバからクラスタを構成して、そのクラスタに含まれるサーバのメモリ上に構成されるKVSである。第一の欠点に対しては、複数のサーバ上にあるメモリを統合することで、一台のサーバでは保持できないメモリ容量を確保できる。第二の欠点に対しては、複数のサーバ間で同じデータを複製しておくことで、一部のサーバが停止してもデータの消滅を回避できる。
 分散KVSを構成する各サーバは、他のサーバとは重複しないレンジを担当し、そのレンジに含まれるデータの集合(以下、パーティション)を格納する。さらに、各サーバは他のサーバが管理しているパーティションの複製を格納する。
 そして、分散KVSには、管理サーバのような特別なサーバが存在しないもしくは多重化させているため、単一点障害が存在しない。すなわち、任意のサーバに障害が発生した場合であっても、他のサーバが複製されたパーティションに基づいて処理を継続できるため、計算機システムが停止することがない。したがって、分散KVSは耐障害性も確保される。
 ここで、分散KVSに格納するデータ量が多くなることで、サーバの負荷が上昇した、または格納可能なデータ量が無くなった際の対策の一つとしてクラスタに新しいサーバを追加するスケールアウトがある。スケールアウトでは、サーバが担当するレンジの変更を行う処理(以下、リバランス処理)が行われる。また、一部のサーバだけにデータが偏ることで、システムのスループットが低下した際の対策の一つとしてデータの偏りを解消する際もリバランス処理が行われる。
 前述したような、リバランス処理については、特許文献1、2に記載された技術が知られている。特許文献1には、既存レンジとそれに対応する既存パーティションに対して、リバランス後の新しいパーティションを用意し、既存パーティションから新しいパーティションヘデータをコピーし、コピー完了後に、既存レンジとそれに対応する既存パーティションから、新しいレンジとそれに対応する新しいパーティションへアクセスを切り替える処理を行うことで、リバランス処理が実現できることが記載されている。
米国特許公報第2011/225122号明細書 国際公開第2015/72025号
 しかしながら、従来の分散KVSを構成する計算機システムは、リバランス処理の際に行われるデータコピーにより、リソース溢れが発生するおそれがある。これに対処するために、メモリの増築やデータの流量監視などを行うことは、運用が煩雑になり、システムの信頼性も低下してしまう。そこで、本発明の目的は、分散KVSの運用容易性及び信頼性を向上させることにある。その他の目的については、実施例の説明において明らかになるであろう。
 一実施例に係る計算機システムは複数の計算機装置を備え、複数の計算機装置は、プロセッサ及びメモリを備え、分散KVSを構成するための複数のノードを実行し、複数のノードは、管理可能なデータ量の上限である上限データ量がそれぞれに設定されている複数のキーレンジを有し、新規のキーレンジを作成する場合、その新規のキーレンジの上限データ量と既存のキーレンジの上限データ量との合計が計算機装置のメモリの容量に基づく量である最大量を超えないように既存のキーレンジの上限データ量を下げる。
 本発明によれば、分散KVSを構成する計算機システムの運用容易性及び信頼性を向上させることができる。
本実施例に係る計算機システムの構成例を示す図。 計算機装置の構成例を示す図。 リバランス装置の構成例を示す図。 リバランス処理の概要を説明するための図。 状態遷移情報の例を示す図。 処理制御情報の例を示す図。 リソース情報の例を示す図。 発番情報の例を示す図。 リバランス装置の処理例を示すフローチャート。 スケールアウト装置の処理例を示すフローチャート。 スケールイン装置の処理例を示すフローチャート。 構成管理プロセスの電文実行部の処理例を示すフローチャート。 構成管理プロセスの発番部の処理例を示すフローチャート。 レンジプロセスの処理番号制御部の処理例を示すフローチャート。 レンジプロセスの状態制御部の処理例を示すフローチャート。 レンジプロセスの電文実行部の処理例を示すフローチャート。 レンジプロセスのリソースチェック部の処理例を示すフローチャート。 リバランス処理の例を説明するための図。 リバランス処理の例を説明するための図。 リバランス処理の例を説明するための図。 リバランス処理の例を説明するための図。 リバランス処理の例を説明するための図。 リバランス処理の例を説明するための図。 リバランス処理の例を説明するための図。 リバランス処理の例を説明するための図。 リバランス処理の例を説明するための図。 スケールアウト処理の例を説明するための図。 スケールアウト処理の例を説明するための図。 スケールアウト処理の例を説明するための図。 スケールアウト処理の例を説明するための図。 スケールアウト処理の例を説明するための図。 スケールアウト処理の例を説明するための図。 スケールアウト処理の例を説明するための図。 スケールアウト処理の例を説明するための図。 スケールイン処理の例を説明するための図。 スケールイン処理の例を説明するための図。 スケールイン処理の例を説明するための図。 スケールイン処理の例を説明するための図。 スケールイン処理の例を説明するための図。 スケールイン処理の例を説明するための図。 スケールイン処理の例を説明するための図。 リバランス処理において電文の二重実施の防止例を説明するための図。 リバランス処理において電文の二重実施の防止例を説明するための図。 リバランス処理において電文の二重実施の防止例を説明するための図。 リバランス処理において電文の二重実施の防止例を説明するための図。 リバランス処理において電文の二重実施の防止例を説明するための図。 リバランス処理において電文の二重実施の防止例を説明するための図。 リバランス処理において電文の二重実施の防止例を説明するための図。 リバランス処理において電文の二重実施の防止例を説明するための図。
 図1は、本実施例に係る計算機システムの構成例を示す。
 計算機システム1は、リバランス装置20、スケールイン装置22、スケールアウト装置24、死活監視装置30、クライアント装置40、及び、複数の計算機装置10を有し、これらは、ネットワーク50を介して双方向通信可能に接続されている。
 複数の計算機装置10は、複数のノード110(図2参照)を有し、複数のノード110が連携して分散KVSを構成する。各ノード110は、キーの全範囲の内の一部の範囲を示すキーレンジ(単に「レンジ」という場合もある)を管理する。耐障害性を高めるため、複数のノード110が、同じキーレンジを管理してよい。以下、複数の計算機装置10を「計算機クラスタ」という場合がある。
 リバランス装置20は、各キーレンジが保持するデータ量に偏りが発生した場合に、各キーレンジが保持するデータ量が均等化されるようにキーレンジを変更する処理(「リバランス処理」という)を実施する装置である。スケールイン装置22は、複数のノード110から少なくとも1つのノード110を削除する処理(「スケールイン処理」という)を実施する装置である。スケールアウト装置24は、複数のノード110に少なくとも1つのノード110を追加する処理(「スケールアウト処理」という)を実施する装置である。リバランス装置20、スケールイン装置22、及びスケールアウト装置24は、1つの装置であってもよい。
 死活監視装置30は、各装置の死活を監視する装置である。例えば、死活監視装置30は、各装置に対して定期的にPINGを送信し、初手の時間内に応答が返ってこなかったならば(タイムアウトしたならば)、その装置が停止していると判断してよい。そして、死活監視装置30は、その停止していると判断した装置に対応する待機系の装置に対して、処理を引き継ぐように指示してよい。
 クライアント装置40は、複数の計算機装置10が構成する分散KVSを利用する。例えば、クライアント装置40は、計算機クラスタに対して、データの書き込み、読み出し、削除等を要求することができる。データの書き込み要求を受領した計算機クラスタは、そのデータからキーを算出し、そのキーを含むレンジを管理するノード110に、そのキー及びデータを書き込んでよい。データの取得要求を受領した計算機クラスタは、そのデータからキーを算出し、そのキーを含むレンジを管理するノード110から、そのキーに対応するデータを読み出して、クライアント装置40へ返してよい。削除についても同様である。
 図2は、計算機装置10の構成例を示す。
 計算機装置10は、プロセッサ102、主記憶デバイス104、補助記憶デバイス103、及びネットワークI/Fデバイス101を備える。
 プロセッサ102は、主記憶デバイス104に格納されるプログラムを実行する。補助記憶デバイス103は、各種情報を格納する。補助記憶デバイス103の例は、HDD、SSD等である。ネットワークI/Fデバイス101は、計算機装置10がネットワーク50を介して他の装置と通信を行うためのデバイスである。ネットワークI/Fデバイス101の例は、Ethernetカード等である。主記憶デバイス104は、プロセッサ102が実行するプログラム及びそのプログラムの実行に必要な情報を格納する。主記憶デバイス102の例は、SRAM、DRAM等である。なお、本実施例は、主記憶デバイス104に分散KVSを構築するが、補助記憶デバイス103に分散KVSを構築するディスクストア(図示省略)を構築してもよい。
 主記憶デバイス104は、ノード110を実現するためのプログラムを格納する。なお、1つの計算機装置10には複数のノード110が存在してもよい。ノード110は、構成管理プロセス130、コピー部160、複数のレンジプロセス170を実現するためのプログラムを含む。
 構成管理プロセス130は、原始的配信部131、電文貯蓄部132、電文実行部133、発番部134、操作発行部135、及び発番情報400を有してよい。
 レンジプロセス170は、原始的配信部171、処理番号制御部174、リソースチェック部175、電文貯蓄部172、状態制御部176、電文実行部173、データストア部177、グループ情報600、リソース情報500、処理制御情報700、状態遷移情報800を有してよい。以下、主記憶デバイス104に格納されるプログラム及び情報について説明する。
<レンジプロセス>
 レンジプロセス170は、一つのレンジを担当する処理単位である。レンジプロセス170は「状態」及び「イベン卜」を用いて対象の振る舞いが表現されるシステム(状態マシンやオートマトンとも呼ばれる)であって、内部に現在の状態を保持し、外部からイベン卜が入力された場合、予め決定されたルールにしたがって、現在の状態を次の状態へ「状態遷移」させる。
 ここで、KVS内で保存しているキーに対するデータを「状態」、当該キーに対するデータ更新等の操作を「イベン卜」、当該操作に対する当該データの更新処理を「状態遷移」と見立てた場合、KVSはキー毎のレンジプロセス170の集合として扱うことができる。
 ただし、キー毎のレンジプロセス170の集合を運用する場合、レンジプロセス170の数が膨大となるため現実的ではない。例えば、キーのデータ長が4バイトである場合、4バイトで表現できるキーの数(2の32乗)より、必要となるレンジプロセス170の数は約42億個になる。
 したがって、KVSは特定のレンジに含まれるキーの集合毎に一つのレンジプロセス170を運用する方が望ましい。レンジはハッシュ値の範囲を表し、各データのキーからハッシュ値を算出し、算出したハッシュ値が含まれるレンジを担当するレンジプロセス170がそのデータを格納するものとする。この方式をConsistent Hashing法と呼ぶ。上記方式以外にもRange法及びList法等の方式を採用しても良い。
 そして、分散KVSをレンジプロセス170で実現しようとする場合、データを複製し合う複数のレンジプロセス170間でデータの一貫性を維持するため、複数のレンジプロセス170に同一の振る舞いを実行させる必要がある。なお、データを複製し合うために同一の振る舞いを実行するレンジプロセス170の集合を「グループ」と呼ぶ。グループに属する全レンジプロセス170が同一の振る舞いを実行するためには、グループに属する全レンジプロセス170に同一イベン卜を同一の入力順で入力する必要がある。そこで、イベン卜を入力する順番を決定するために原子的配信部171が使用される。
 レンジプロセス170の原子的配信部171は、同じグループに属するレンジプロセス170の原子的配信部171と通信できる。グループに関する情報は、グループ情報600に格納されている。そして、例えば分散合意アルゴリズムを用いて、グループ内で同一の電文を同一の順序で配信する。当該配信方法を原子的配信と呼ぶ(他にも全順序ブロードキャス卜や原子的ブロードキャス卜とも呼ばれることがある)。
 電文実行部173は、電文貯蓄部172から電文を取り出し、データストア部177が管理するデータに対し、電文に対応した各種処理を行う。各種処理は、例えばデータの更新、上限データ量の下げ操作、上限データ量の上げ操作、初期化操作などである。
<構成管理プロセス>
 構成管理プロセス130は、死活監視装置20やリバランス装置20などから受領した電文に基づいて各種の動作を行う。
 構成管理プロセス130の原始的配信部131は、全ての構成管理プロセス130含まれる原始的配信部171と通信でき、全ての構成管理プロセス130に原子的配信する。
 電文貯蓄部132は、原始的配信部131で原始的配信された電文をFIFO方式で一時的に貯蓄する。
 電文実行部133は、電文貯蓄部172から電文を取り出して、その電文に対応した各種処理を行う。各種処理は、例えば、構成変更処理や、採番処理などである。詳細については後述する。
 発番部134は、処理番号を発番する。詳細については後述する。
 操作発行部135は、電文送信部211や構成管理プロセス130の電文実行部133が送信する電文に処理番号を付与する。
 図3は、リバランス装置20の構成例を示す。
 リバランス装置20は、プロセッサ202、主記憶デバイス204、補助記憶デバイス203、及びネットワークI/Fデバイス201を備える。
 プロセッサ202は、主記憶デバイス204に格納されるプログラムを実行する。補助記憶デバイス203は、各種情報を格納する。補助記憶デバイス203の例は、HDD、SSD等である。ネットワークI/Fデバイス201は、リバランス装置20がネットワーク50を介して他の装置と通信を行うためのデバイスである。ネットワークI/Fデバイス201の例は、Ethernetカード等である。主記憶デバイス204は、プロセッサ202が実行するプログラム及びそのプログラムの実行に必要な情報を格納する。主記憶デバイス204の例は、SRAM、DRAM等である。
 主記憶デバイス204には、構成情報管理部214、性能監視部215、電文送信部211、採番部213、操作発行部212の機能を実現するためのプログラムが格納されてよい。
 構成情報管理部214は、ノード110、及びノード110に含まれるレンジプロセス170の構成に関する構成情報を管理する。
 性能監視部215は、各グループの性能指標を定期的に収集する。そして、性能監視部215は、その収集結果から、グループ間で性能指標の偏りが発生しているか否かを判定する。性能監視部215は、偏りが発生していると判定した場合、リバランス処理に係る電文を電文送信部211に送信させる。
 電文送信部211は、リバランス処理を行うために、計算機クラスタに対して、電文を送信する。これらの電文は、例えば、初期化電文、上限データ量上げ電文、上限下げ電文、初期化電文やレンジプロセス170を操作するための電文であってよい。レンジプロセス170の操作とは、例えば、空のレンジの作成操作、レンジの分割操作、レンジのコピー操作、レンジの併合操作等である。詳細については後述する。
 採番電文は、計算機クラスタに対して、処理番号の採番を要求する電文である。採番電文は、後述の採番部213によって発行されてよい。
 上限データ量上げ電文は、計算機クラスタに対して、指定のキーレンジの上限データ量を上げることを要求する電文である。
 上限データ量下げ電文は、計算機クラスタに対して、指定のキーレンジの上限データ量を下げることを要求する電文である。
 構成変更電文は、死活監視装置30がノード110のダウンを検知した場合に送られる電文であり、計算機クラスタからダウンしたノード110を切り離すことを要求する電文である。
 データ更新電文は、計算機クラスタに対して、指定のデータに対する更新(書き込み、読み出し、移動、削除等)を要求する電文である。
 初期化電文は、リバランス処理の開始に先だって、計算機クラスタに対して、状態遷移情報800中の状態を初期化することを要求する電文である。
 採番部213は、計算機クラスタに対して採番を要求する電文(「採番電文」)を発行する。そして、採番部213は、その採番電文に対して計算機クラスタから発番された処理番号を管理する。この処理番号と操作発行部212により、例えば、何らかの異常状態により、現用系のリバランス装置20と待機系のリバランス装置20とが同じ電文を計算機クラスタに送信してしまったときに、計算機クラスタがこれらの同じ電文を二重実施してしまうことを防止することができる。
 図4は、リバランス処理の概要を説明するための図である。
 この例では、ハッシュ値は1~2000の間で求められ、1~2000までのレンジでシステムが取り扱う全データが格納できるとする。ここで、1~1000のレンジαに含まれる丸で表わされるデータを処理するグループA、1001~1700のレンジβに含まれる四角で表わされるデータを処理するグループB、1701~2000のレンジγに含まれる三角で表わされるデータを処理するグループC、によってデータ更新等の操作を処理する分散KVSについて説明する。なお、各ノードが保持可能な最大データ量を「200MB」とし、レンジα、β、γの上限データ量を、それぞれ、「100MB」とする。
 R1のように、グループAはレンジαに含まれる3個のデータを処理しており、各データはノードAとノードB上に存在するグループAに属するレンジプロセスのデータストア部177で多重化されているため、グループAは計6個(=3個x2多重)のデータを保持している。
 同様に、グループBはレンジβに含まれる7個のデータを処理しており、各データはノードAとノードC上に存在するグループBに属するレンジプロセスのデータストア部で多重化されているため、グループBは計14個(=7個x2多重)のデータを保持している。
 さらに同様に、グループCはレンジγに含まれる5個のデータを処理しており、各データはノードBとノードC上に存在するグループCに属するレンジプロセスのデータストア部で多重化されているため、グループCは計10個(=5個x2多重)のデータを保持している。
 このため各グループ間で負荷に偏りが生じている。そこで、レンジβの範囲を狭め、レンジαの範囲を広げることにより偏りを無くすため、移動グループの作成、グループの分割操作、移動グループの移動、グループの併合操作及び移動グルーフの削除というステップを実施することによりリバランスする処理を説明する。
 まず、グループの分割操作の準備として、グループBを含むノードに、レンジ範囲が無い空レンジを担当する、一時的に使用する移動グループDを作成する。具体的には、ノードAとノードCがグループBに属するレンジを含むため、ノードAとノードCに移動グループDを作成する。
 次に、グループの分割操作を行い、グループBのレンジβと移動グループDのレンジδを更新する。また、グループの分割操作を行う際、移動グループDが新しく担当するレンジでグループBが格納しているデータについては、グループBから移動グループDへ移動させる。なお、移動グループDが担当するデータは図中では菱形で表される。
 次に、R2のように、移動グルーフDを移動させるため、まず、ノードCが保持する移動グループDに属するレンジプロセス及び当該レンジプロセスが保持するデータをノードBにコピーし、コピーしたレンジプロセスを移動グループDに属させる(図中の「コピー」)。ここで、あるグループに属するレンジプロセスを別のノードにコピーし、かつ同じグループに属させることをグループ内プロセスコピー処理と呼ぶ。
 このとき、ノードBには、元々のグループA(レンジα)とグループC(レンジγ)のデータに加えて、コピーされたグループD(レンジδ)のデータが存在することになる。すなわち、レンジαの上限データ量「100MB」と、レンジγの上限データ量「100M」と、レンジδの上限データ量「38MB」の合計が、ノードBが保持可能な最大データ量「200MB」を超えてしまっている。本実施例は、このような問題が発生しないようにする。
 次に、グループの併合操作上で邪魔となるノードC上に存在する移動グループDに属するレンジプロセスを削除する。ここで、あるグループに属するレンジプロセスの一部を削除することをグループ内プロセス削除処理と呼んでもよい。
 次に、R3のように、グループの併合操作を行い、グループAのレンジαと移動グループDのレンジδを更新する。また、グループの併合操作を行う際、グループAが新しく担当するレンジで移動グループDが格納しているデータについては、移動グループDからグループAへ移動させる。
 これにより、R1と比べてR3は、グループAのレンジαが「1~1000」から「1~1500」に変更され、グループBのレンジβが「1001~1700」から「1501~1700」に変更され、また、グループAとグループBに格納されるデータ数が各々10個(=5個x2多重)に均等化されている。
 ここで、グループの分割操作とグループの併合操作は、「レンジ更新処理」と呼ばれる処理によって実現する。具体的には、グループの分割操作は、グループBが担当するレンジβと移動グループDが担当するレンジδを、「1001~1700」と「NULL」から、「1501~1700」と「1001~1501」に更新することで実現する。また、グループの併合操作は、移動グループDが担当するレンジδとグループAが担当するレンジαを、「1001~1501」と「1~1000」から、「NULL」とレンジ「1~1500」に更新することで実現する。
 図5は、状態遷移情報800の例を示す。
 状態遷移情報800は、レンジプロセス170の状態と、その状態においてレンジプロセス170が実行可能な操作との対応関係についての情報を含む。
 図5の例は、初期状態のとき、上限データ量を上げる操作(上限データ量上げ操作)、及び、上限データ量を下げる操作(上限データ量下げ操作)が実行可能であることを示す。同様に、上限データ量下げ操作が完了している状態(上限データ量下げ状態)のとき、上限データ量上げ操作のみが実行可能であり、上限データ量上げ操作が完了している状態(上限データ量上げ状態)のとき、初期化操作のみが実行可能であることを示す。
 これにより、一連の処理(例えば1回のリバランス処理)における、上限データ量の上げ下げの操作の整合性を保つことができる。
 図6は、処理制御情報700の例を示す。
 処理制御情報700には、レンジプロセス170がリバランス装置20などから最後に受領した電文の処理番号(最終処理番号)、及び、レンジプロセス170の現在の状態についての情報を含む。
 最終処理番号は、上記で説明したように、同じ電文の二重実行を防止するために用いられる。
 レンジプロセス170の現在の状態は、レンジプロセス170が現在、実行可能な操作を決めるために用いられる。ノード110の現在の状態が取り得る値は、状態遷移情報800のノード110の状態に登録されている値であってよい。
 図7は、リソース情報500の例を示す。
 リソース情報500は、レンジの現在の上限データ量、及び、そのレンジに現在保持されているデータ量(保持データ量)についての情報を含む。
 図8は、発番情報400の例を示す。
 発番情報400は、構成管理プロセス130の発番部134が、リバランス装置20等に発番した処理番号についての情報を含む。
 図9は、リバランス装置20の処理例を示すフローチャートである。
 リバランス装置20は、性能監視部215によってリバランスが必要と判定すると、以下の処理を実施する。
 (S200)採番部213は、構成管理プロセス130に対して採番電文を送信する。そして採番部213は、構成管理プロセス130から当該リバランス処理に対応する処理番号を受領し、これを登録する。この処理番号は、操作発行部212を通して、以下のリバランス処理における全ての電文に付与されてもよい。そしてS202へ進む。
 (S202)電文送信部211は、レンジプロセス170に対して、初期化電文を送信する。そしてS204へ進む。
 (S204)電文送信部211は、レンジプロセス170と連携して、移動元レンジを管理するノード110に、空の一時レンジを作成する。そしてS206へ進む。
 (S206)電文送信部211は、レンジプロセス170に対して、移動元レンジ及び移動先レンジの上限データ量下げ電文を送信する。そしてS208へ進む。
 (S208)電文送信部211は、レンジプロセス170と連携して、移動元レンジのレンジ分割を実行する。例えば、操作発行部は、移動元レンジの一部のデータをS204で作成した一時レンジに移動させる。
 (S210)電文送信部211は、レンジプロセス170と連携して、一時レンジを、移動先レンジを管理するノード110にコピーする。そしてS212へ進む。
 (S212)電文送信部211は、レンジプロセス170と連携して、一時レンジを移動先レンジに併合する。そしてS214へ進む。
 (S214)電文送信部211は、レンジプロセス170と連携して、一時レンジ(不要レンジ)を削除する。そしてS216へ進む。
 (S216)電文送信部211は、レンジプロセス170に対して、移動元レンジ及び移動先レンジの上限データ量上げ電文を送信する。そして本処理を終了する。
 以上によれば、リバランス処理において、ノード110が管理するデータ量がそのノード110が管理可能な最大データ量を超えることを防止することができる。なお、本処理の具体例を、図18A~図18I、及び、図21A~図21Hに示す。
 図10は、スケールアウト装置24の処理例を示すフローチャートである。
 スケールアウト装置24は、新規ノード110を計算機クラスタに追加する場合(S300)、以下の処理を実施する。
 (S302)採番部213は、構成管理プロセス130に対して採番電文を送信する。そして採番部213は、構成管理プロセス130から当該スケールアウト処理に対応する処理番号を受領し、これを登録する。この処理番号は、操作発行部212を通して、以下のスケールアウト処理における全ての電文に付与されてよい。そしてS304へ進む。
 (S304)電文送信部211は、レンジプロセス170に対して、初期化電文を送信する。そしてS306へ進む。
 (S306)電文送信部211は、レンジプロセス170と連携して、移動元レンジを管理するノード110に空の移動先レンジを生成する。そしてS308へ進む。
 (S308)電文送信部211は、レンジプロセス170に対して、移動元レンジの上限データ量下げ電文を送信する。そしてS310へ進む。
 (S310)電文送信部211は、レンジプロセス170と連携して、移動元レンジのレンジ分割を実施する。例えば、操作発行部212は、移動元レンジの一部のデータをS306で作成した移動先レンジに移動させる。そしてS312へ進む。
 (S312)電文送信部211は、レンジプロセス170と連携して、移動先レンジを新規ノード110にコピーする。また、操作発行部212は、レンジプロセス170と連携して、移動先レンジを新規ノード110にコピーする。
 (S314)電文送信部211は、レンジプロセス170と連携して、S312のレンジのコピーによって余分になったレンジ(不要レンジ)を削除する。そしてS214へ進む。
 (S316)電文送信部211は、レンジプロセス170に対して、移動元レンジ及び移動先レンジの上限データ量上げ電文を送信する。そして本処理を終了する。
 以上によれば、スケールアウト処理において、ノード110が管理するデータ量がそのノード110が管理可能な最大データ量を超えることを防止することができる。なお、本処理の具体例を、図19A~図19Hに示す。
 図11は、スケールイン装置22の処理例を示すフローチャートである。
 スケールイン装置22は、計算機クラスタから既存ノード110を削除する場合、以下の処理を実施する。
 (S400)採番部213は、構成管理プロセス130に対して採番電文を送信する。そして採番部213は、構成管理プロセス130から当該スケールイン処理に対応する処理番号を受領し、これを登録する。この処理番号は、操作発行部212を通して、以下のスケールイン処理における全ての電文に付与されてよい。そしてS402へ進む。
 (S402)電文送信部211は、レンジプロセス170に対して、初期化電文を送信する。そしてS404へ進む。
 (S404)電文送信部211は、レンジプロセス170に対して、移動元レンジ及び併合先レンジの上限データ量下げ電文を送信する。そしてS406へ進む。
 (S406)電文送信部211は、レンジプロセス170と連携して、移動元レンジを、移動先レンジを管理するノード110に複製する。そしてS408へ進む。
 (S408)電文送信部211は、レンジプロセス170と連携して、移動先レンジを移動先レンジに併合する。そしてS410へ進む。
 (S410)電文送信部211は、移動元レンジ(不要レンジ)を削除する。そしてS412へ進む。
 (S412)電文送信部212は、レンジプロセス170に対して、移動先レンジの上限値データ量上げ電文を送信する。そしてS414へ進む。
 (S414)電文送信部211は、削除対象ノード110を計算機クラスタから削除する。そして本処理を終了する。
 以上によれば、スケールイン処理において、ノード110が管理するデータ量がそのノード110が管理可能な最大データ量を超えることを防止することができる。なお、本処理の具体例を、図20A~図20Gに示す。
 図12は、構成管理プロセス130の電文実行部133の処理例を示すフローチャートである。
 (S500)電文実行部133は、受領した電文が構成変更電文であるか否かを判定し、その判定結果が「YES」ならばS504へ進み、「NO」ならばS502へ進む。
 (S502)電文実行部133は、受領した電文が採番電文であるか否かを判定し、その判定結果が「YES」ならばS510へ進み、「NO」ならば本処理を終了する。
<構成変更電文の場合>
 (S504)電文実行部133は、初期化電文を受領しているレンジプロセス170を含むノード110の構成管理プロセス130であって、代表となる構成管理プロセス130であるか否かを判定する。その判定結果が「YES」ならばS512へ進み、「NO」ならば本処理を終了する。
 (S512)電文実行部133は、レンジプロセス170に上限データ量上げ電文を送信し本処理を終了する。また、電文を送信する際に、操作発行部135を通して処理番号を付与してもよい。
<採番電文の場合>
 (S510)発番部134は、その受領した採番電文に対応する処理番号を発番し、本処理を終了する。発番部134の処理の詳細については後述する(図13参照)
 図13は、構成管理プロセス130の発番部134の処理例を示すフローチャートである。
 (S600)発番部134は、電文実行部133から採番電文を受け取ると、S602の処理に進む。
 (S602)発番部134は、発番情報400に含まれる処理番号よりも大きな処理番号を発番する。そしてS604へ進む。
 (S604)発番部134は、S602で発番した処理番号を発番情報400に登録する。そしてS606へ進む。
 (S606)発番部134は、自分が原始的配信部131で採番電文を受領したノード110であるか否かを判定し、その判定結果が「YES」ならばS608へ進み、「NO」ならば本処理を終了する。
 (S608)発番部134は、S602で発番した処理番号を、採番電文の送信元(例えばリバランス装置20)に返す。そして本処理を終了する。
 図14は、レンジプロセス170の処理番号制御部174の処理例を示すフローチャートである。
 (S700)処理番号制御部174は、電文貯蓄部172から電文を取り出す。そしてS702へ進む。
 (S702)処理番号制御部174は、S700で取り出した電文の処理番号が、処理制御情報700に登録されている最終処理番号以上であるか否かを判定する。処理番号制御部174は、その判定結果が「YES」ならばS704へ進み、「NO」ならば本処理を終了する。
 (S704)処理番号制御部174は、最終処理番号を、その取得した電文の処理番号に更新する。そしてS706へ進む。
 (S706)処理番号制御部174は、S700で取り出した電文を状態制御部176に渡し、本処理を終了する。
 図15は、レンジプロセス170の状態制御部176の処理例を示すフローチャートである。
 (S800)状態制御部176は、処理番号制御部174から電文を受け取ると、S802へ進む。
 (S802)状態制御部176は、状態遷移情報800を参照し、S800で受け取った電文が、処理制御情報700の現在の状態において実行可能であるか否かを判定する。状態制御部176は、その判定結果が「YES」ならばS804へ進み、「NO」ならば本処理を終了する。
 (S804)状態制御部176は、S800で受け取った電文を電文実行部173に渡し、本処理を終了する。
 図16は、レンジプロセス170の電文実行部173の処理例を示すフローチャートである。
 (S900)電文実行部173は、状態制御部176から電文を受け取ると、S902へ進む。
 (S902)電文実行部173は、その電文がデータ更新電文であるか否かを判定し、その判定結果が「YES」ならばS904へ進み、「NO」ならばS910へ進む。
 (S910)電文実行部173は、その電文が上限データ量上げ電文であるか否かを判定し、その判定結果が「YES」ならばS912へ進み、「NO」ならばS920へ進む。
 (S920)電文実行部173は、その電文が上限データ量下げ電文であるか否かを判定し、その判定結果が「YES」ならばS922へ進み、「NO」ならばS930へ進む。
 (S930)電文実行部173は、その電文が初期化電文であるか否かを判定し、その判定結果が「YES」ならばS932へ進み、「NO」ならば本処理を終了する。
<データ更新電文の場合>
 (S904)電文実行部173は、データをデータストア部177に蓄積し、本処理を終了する。
<上限データ量上げ電文の場合>
 (S912)電文実行部173は、リソース情報500の上限データ量を上げ操作する。例えば、リソース情報500の上限データ量を、上限データ量上げ電文の指定する値に変更する。そしてS914へ進む。
 (S914)電文実行部173は、処理制御情報700の現在の状態を「上限データ量上げ状態」に変更し、本処理を終了する。
<上限データ量下げ電文の場合>
 (S922)電文実行部173は、リソース情報500の上限データ量を下げ操作する。例えば、リソース情報500の上限データ量を、上限データ量下げ電文の指定する値に変更する。そしてS924へ進む。
 (S924)電文実行部173は、処理制御情報700の現在の状態を「上限データ量下げ状態」に変更し、本処理を終了する。
<初期化電文の場合>
 (S932)電文実行部173は、処理制御情報700を「初期状態」に変更し、本処理を終了する。
 図17は、レンジプロセス170のリソースチェック部175の処理例を示すフローチャートである。
 (S1000)リソースチェック部175は、リソース情報500から上限データ量を取得する。
 (S1002)リソースチェック部175は、受領したデータ更新電文のデータをそのレンジに登録しても、S1000で取得した上限データ量を超えないか否かを判定する。リソースチェック部175は、その判定結果が「YES」ならばS1004へ進み、「NO」ならば本処理を終了する。
 (S1004)リソースチェック部175は、原始的配信部171にそのデータ更新電文を渡し、本処理を終了する。
 次に、リバランス処理、スケールアウト処理、及び、スケールイン処理の具体的な例を示す。
 図18A~図18Iは、本実施例におけるリバランス処理の例を説明するための図である。
 (図18A)ノードAがレンジ1及びレンジ4を管理し、ノードBがレンジ1及びレンジ2を管理し、ノードCがレンジ2及びレンジ3を管理し、ノードDがレンジ3及びレンジ4を管理している構成において、レンジ3内のデータの一部をレンジ2に移動させるリバランス処理を行う。各ノードの最大メモリ量は「200」、各レンジの監視上限(上限データ量に相当)は「100」とする。
 (図18B)S204の処理により、移動元レンジ3を管理するノードC及びノードDに空の一時レンジ3.5を作成する。ここで、空の一時レンジ3.5の監視上限を「38」とする。
 (図18C)S206の処理により、移動元レンジ3及び移動先レンジ2の上限データ量下げ電文(監視上限を「62」に変更する電文)を送信し、移動元レンジ3及び移動先レンジ2の監視上限を「62」に変更する。この監視上限の値は、ノードが管理する全てのレンジの監視上限の合計が、ノードの最大メモリ量「200」を超えないように決定されてよい。
 (図18D)S208の処理により、移動元レンジ3内の一部のデータを一時レンジ3.5に移動させる。
 (図18E)S210の処理により、一時レンジ3.5を、移動先レンジ2を管理するノードBに複製する。このとき、ノードBには、レンジ1とレンジ2とレンジ3.5が存在するが、図18Cにおいてレンジ2の監視上限が「62」に下げられているので、これらのレンジの監視上限の合計は、ノードBの最大メモリ量「200」を超えない。すなわち、リソース溢れが防止される。
 (図18F)S212の処理により、レンジ3.5をレンジ2に併合する。
 (図18G)S214の処理により、不要となったレンジ3.5を削除する。
 (図18H)S216の処理により、移動元レンジ3及び移動先レンジ2の上限データ量上げ電文(監視上限を「100」に変更する電文)を送信し、移動元レンジ3及び移動先レンジ2の監視上限を「100」に変更する。これにより、図18Cで一旦下げられたレンジ2及び3の監視上限が元に戻る。
 (図18I)これらのリバランス処理が行われている間、例えばクライアント装置40は、各レンジに対してデータ更新電文を送信してもよい。また、スケールアウト、スケールインについても同様である。
 図19A~図19Hは、本実施例におけるスケールアウト処理の例を説明するための図である。
 (図19A)ノードAがレンジ1及びレンジ4を管理し、ノードCがレンジ1及びレンジ3を管理し、ノードDがレンジ3及びレンジ4を管理している構成において、計算機クラスタにノードBを追加するスケールアウト処理を行う。各ノードの最大メモリ量は「200」、各レンジの監視上限は「100」とする。
 (図19B)S300の処理において、ノードBを計算機クラスタに追加する。
 (図19C)S306の処理において、移動元レンジ3を管理するノードC及びレンジ4に空の移動先レンジ3.5を作成する。ここで、移動先レンジ3.5の監視上限を「38」とする。
 (図19D)S308の処理により、移動元レンジ3の上限データ量下げ電文の送信処理し、移動先レンジ3の監視上限を「62」に変更する。
 (図19E)S310の処理により、移動元レンジ3内の一部のデータを移動先レンジ3.5に移動させる。このとき、ノードCには、レンジ1とレンジ3とレンジ3.5とが存在するが、図19Dにおいてレンジ3の監視上限が「62」に下げられているので、これらのレンジの監視上限の合計は、ノードCの最大メモリ量「200」を超えない。ノードDについても同様である。つまり、リソース溢れが防止される。
 (図19F)S312の処理により、移動先レンジ3.5を追加ノードBにコピーする。また、全体でデータ量が均等化されるように、必要に応じて、ノードAのレンジ1を追加ノードBにコピーしてもよい。
 (図19G)S314の処理により、余分となった(不要な)ノードCのレンジ1及びノードDのレンジ3.5を削除する。
 (図19H)S316の処理により、移動元レンジ3及び移動先レンジ3.5の上限データ量上げ電文(監視上限を「100」に変更する電文)を送信し、移動元レンジ3及び移動先レンジ3.5の監視上限を「100」に変更する。これにより、図19Eで一旦下げられた移動元レンジ3の監視上限が元に戻る。また、図19Cで作成された移動先レンジ3.5の監視上限が「100」に上がる。
 図20A~図20Gは、本実施例におけるスケールイン処理の例を説明するための図である。
 (図20A)ノードAがレンジ1及びレンジ4を管理し、ノードBがレンジ1及びレンジ2を管理し、ノードCがレンジ2及びレンジ3を管理し、ノードDがレンジ3及びレンジ4を管理している構成において、ノードBを計算機クラスタから切り離すスケールイン処理を行う。各ノードの最大メモリ量は「200」、各レンジの監視上限は「100」である。
 (図20B)S404の処理により、移動元レンジ2及び移動先レンジ3の上限データ量下げ電文(監視上限を「50」に変更する電文)を送信し、移動元レンジ2及び移動先レンジ3の監視上限を「50」に変更する。
 (図20C)S406の処理により、移動元レンジ2を、移動先レンジ3を管理するノードDにコピーする。このとき、ノードDには、レンジ2とレンジ3とレンジ4とが存在するが、図20Bにおいてレンジ3とレンジ4の監視上限が「50」に下げられているので、これらのレンジの監視上限の合計は、ノードDの最大メモリ量「200」を超えない。つまり、リソース溢れが防止される。なお、冗長性を確保するために、削除対象のノードBが管理するレンジ1を、ノードCにコピーしてよい。
 (図20D)S408の処理により、移動元レンジ2を移動先レンジ3に併合させる。
 (図20E)S410の処理により、不要となった移動元レンジ2を削除する。
 (図20F)S412の処理により、併合レンジ3の上限データ量上げ電文を送信し、併合データ量の監視上限を「100」に変更する。これにより、図20Bでいったん下げられた移動先レンジ3の監視上限が元に戻る。
 (図20G)S414の処理により、削除対象のノードBを計算機クラスタから削除する。
 図21A~図21Hは、リバランス処理において電文の二重実施が防止される例を説明するための図である。
 (図21A)ノードAがレンジ1及びレンジ4を管理し、ノードBがレンジ1及びレンジ2を管理し、ノードCがレンジ2及びレンジ3を管理し、ノードDがレンジ3及びレンジ4を管理している構成において、現用系のリバランス装置20が、レンジ3内のデータの一部をレンジ2に移動させるリバランス処理を行う。各ノードの最大メモリ量は「200」、各レンジの監視上限は「100」とする。現用系のリバランス装置20のS200の処理により、構成管理プロセス130に採番電文を送信する。
 (図21B)採番電文を受領した構成管理プロセス130は、S600~S608の処理により、処理番号「1」を発番し、現用系のリバランス装置20へ送信する。また、構成管理プロセス130は、その発番した処理番号「1」を、発番情報400に登録する。処理番号「1」を受領した現用系のリバランス装置20は、この処理番号「1」を保持する。
 (図21C)現用系のリバランス装置20のS206の処理により、保持中の処理番号「1」を含む、移動元レンジ2及び移動先レンジ3の上限データ量下げ電文(監視上限を「62」に変更する電文)を送信する。この上限データ量下げ電文の処理番号1は、構成管理プロセス130が発番情報400に保持中の処理番号「1」と同じ(S702の判定結果が「YES」)なので、実行される。つまり、監視上限が「62」に変更される。そして、この移動元レンジ2及び移動先レンジ3には、処理番号「1」が対応付けられる。
 (図21D)ここで、死活監視装置30が、現用系のリバランス装置20が停止したと誤判断したとする。誤判断の例は、現用系のリバランス装置20の処理負荷が高く、死活監視装置30へのPING応答が遅れた(タイムアウトになった)場合などである。この場合、死活監視装置30は、待機系のリバランス装置20に対して処理の切り替えを指示する。
 (図21E)待機系のリバランス装置20は、上記の図21Aと同様、構成管理プロセス130に採番電文を送信する。採番電文を受領した構成管理プロセス130の発番部134は、例えば、発番情報400に保持中の処理番号「1」よりも大きい処理番号「2」を発番し、待機系のリバランス装置20へ送信する。また、構成管理プロセス130は、その発番した処理番号「2」を発番情報400に登録する。処理番号「2」を受領した待機系のリバランス装置20は、この処理番号「2」を保持する。
 (図21F)待機系のリバランス装置20のS206の処理により、上記の図21Cと同様、保持中の処理番号2を含む、移動元レンジ2及び移動先レンジ3の上限データ量下げ電文(監視上限を「62」に変更する電文)を送信する。この上限データ量下げ電文は、構成管理プロセス130が発番情報400に保持中の処理番号2と同じ(S702の判定結果が「YES」)なので、実行される。つまり、監視上限は同じく「62」に変更される。そして、この移動元レンジ2及び移動先レンジ3には、処理番号「2」が対応付けられる。
 (図21G)ここで、実際は停止していなかった現用系のリバランス装置20が、図21Cで実施したS206以降の処理(つまりS208~S216の処理)を引き続き実施しようとする。例えば、S216の処理として、保持中の処理番号「1」を含む、移動元レンジ2及び移動先レンジ3の上限データ量上げ電文(管理上限を「100」に変更する電文)を送信する。しかし、この上限データ量上げ電文の処理番号「1」は、レンジ2及び3に対応付けられている処理番号「2」よりも小さい(S702の判定結果が「NO」)なので、実行されない。すなわち、電文の二重実施が防止され、監視上限は「62」のままとなる。
 (図21H)一方、待機系のリバランス装置20も、上記図21Fで実施したS206以降の処理(つまりS208~S216の処理)を引き続き実施しようとする。例えば、S216の処理として、保持中の処理番号「2」を含む、移動元レンジ2及び移動先レンジ3の上限データ量上げ電文(管理上限を「100」に変更する電文)を送信する。この上限データ量上げ電文の処理番号「2」は、レンジ2及び3に対応付けられている処理番号「2」と同じ(S702の判定結果が「YES」)なので、実行される。つまり、監視上限は「100」に変更される。
 以上の処理によれば、現用系及び待機系のリバランス装置20が存在する構成において、リバランス処理が二重実施されることを防止することができる。
 上述した実施形態は、本発明の説明のための例示であり、本発明の範囲を実施形態にのみ限定する趣旨ではない。当業者は、本発明の要旨を逸脱することなしに、他の様々な態様で本発明を実施することができる。
 10:計算機装置 20:リバランス装置 22:スケールイン装置 24:スケールアウト装置 30:死活監視装置 40:クライアント装置 110:ノード 130:構成管理プロセス 170:レンジプロセス

Claims (9)

  1.  複数の計算機装置を備える計算機システムであって、
     複数の計算機装置は、プロセッサ及びメモリを備え、分散KVS(Key-Value Store)を構成するための複数のノードを実行し、
     複数のノードは、管理可能なデータ量の上限である上限データ量がそれぞれに設定されている複数のキーレンジを有し、
     複数のノードは、新規のキーレンジを作成する場合、その新規のキーレンジの上限データ量と既存のキーレンジの上限データ量との合計が前記計算機装置のメモリの容量に基づく量である最大量を超えないように、前記既存のキーレンジの上限データ量を下げる
    計算機システム。
  2.  複数のノードは、それぞれが管理しているデータ量に偏りが存在するときにキーレンジを変更する処理であるリバランス処理を行う場合、
      データの移動元及び移動先のキーレンジの上限データ量を下げた後、移動元のキーレンジの一部を分割して新規のキーレンジを生成し、
      その新規のキーレンジに移動元のキーレンジの一部のデータを移行し、
      その新規のキーレンジを移動先のキーレンジを管理するノードにコピーし、
      そのコピーした新規のキーレンジを移動先のキーレンジに併合し、
      移動元及び併合後のキーレンジの上限データ量を上げる
    請求項1に記載の計算機システム。
  3.  複数のノードは、新規ノードを追加する処理であるスケールアウト処理を行う場合、
      データの移動元のキーレンジの上限データ量を下げた後、移動元のキーレンジの一部を分割して新規のキーレンジを生成し、
      その新規のキーレンジに移動元のキーレンジの一部のデータを移行し、
      その新規のキーレンジを新規ノードにコピーし、
      移動元及び新規のキーレンジの上限データ量を上げる
    請求項1に記載の計算機システム。
  4.  複数のノードは、既存のノードを削除する処理であるスケールイン処理を行う場合、
      移動先のキーレンジ及び削除対象のノードが有する移動元のキーレンジの上限データ量を下げた後、
      その移動元のキーレンジを移動先のキーレンジを管理するノードにコピーし、
      そのコピーした移動元のキーレンジを移動先のキーレンジに併合し、
      併合後のキーレンジの上限データ量を上げる
    請求項1に記載の計算機システム。
  5.  前記リバランス処理に関する指示を複数のノードに発行するリバランス装置をさらに備え、
     複数のノードにおけるキーレンジの上限データ量の下げる及び上げる処理は、前記リバランス装置から発行される指示に基づいて行われる
    請求項2に記載の計算機システム。
  6.  複数のノードは、キーレンジの上限データ量の状態が、初期状態、下げ状態、又は、上げ状態の何れであるかを管理し、
      前記リバランス装置からキーレンジの上限データ量を下げる指示を受領したとき、前記キーレンジの上限データ量の状態が初期状態ならば当該指示を実行し、それ以外の状態ならば当該指示を実行せず、
      前記リバランス装置からキーレンジの上限データ量を上げる指示を受領したとき、前記キーレンジの上限データ量の状態が初期状態又は上げ状態ならば当該指示を実行し、前記キーレンジの上限データ量の状態が上げ状態ならば当該指示を実行しない
    請求項5に記載の計算機システム。
  7.  複数のノードは、リバランス装置にリバランス処理に対応する処理番号を提供し、
     リバランス装置は、複数のノードに対する指示にその提供された処理番号を含め、
     複数のノードは、
      最後に実施した処理番号を管理しておき、
      リバランス装置から受領した指示に含まれる処理番号が、最後に実施した処理番号と同じ又はそれより大きいならばその指示を実施し、前記処理番号が最後の実施した処理番号よりも小さいならばその指示を実施しない
    請求項5に記載の計算機システム。
  8.  キーレンジの上限データ量を上げる又は下げる指示は、複数のノードの間で原始的配信される
    請求項5に記載の計算機システム。
  9.  複数の計算機装置を備える計算機システムで実行されるデータ処理方法であって、
     複数の計算機装置は、プロセッサ及びメモリを備え、分散KVSを構成するための複数のノードを実行し、
     複数のノードは、管理可能なデータ量の上限である上限データ量がそれぞれに設定されている複数のキーレンジを有し、
     複数のノードは、新規のキーレンジを作成する場合、その新規のキーレンジの上限データ量と既存のキーレンジの上限データ量との合計が前記計算機装置のメモリの容量に基づく量である最大量を超えないように、前記既存のキーレンジの上限データ量を下げる
    データ処理方法。
PCT/JP2016/052642 2016-01-29 2016-01-29 計算機システム、及び、データ処理方法 WO2017130377A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP2016/052642 WO2017130377A1 (ja) 2016-01-29 2016-01-29 計算機システム、及び、データ処理方法
JP2017544685A JP6360634B2 (ja) 2016-01-29 2016-01-29 計算機システム、及び、データ処理方法
US15/561,214 US10719496B2 (en) 2016-01-29 2016-01-29 Computer system and data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2016/052642 WO2017130377A1 (ja) 2016-01-29 2016-01-29 計算機システム、及び、データ処理方法

Publications (1)

Publication Number Publication Date
WO2017130377A1 true WO2017130377A1 (ja) 2017-08-03

Family

ID=59397701

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2016/052642 WO2017130377A1 (ja) 2016-01-29 2016-01-29 計算機システム、及び、データ処理方法

Country Status (3)

Country Link
US (1) US10719496B2 (ja)
JP (1) JP6360634B2 (ja)
WO (1) WO2017130377A1 (ja)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10725988B2 (en) 2017-02-09 2020-07-28 Micron Technology, Inc. KVS tree
US10706106B2 (en) 2017-02-09 2020-07-07 Micron Technology, Inc. Merge tree modifications for maintenance operations
US10719495B2 (en) 2017-02-09 2020-07-21 Micron Technology, Inc. Stream selection for multi-stream storage devices
US10706105B2 (en) 2017-02-09 2020-07-07 Micron Technology, Inc. Merge tree garbage metrics
CN109325015B (zh) * 2018-08-31 2021-07-20 创新先进技术有限公司 一种领域模型的特征字段的提取方法及装置
US10915546B2 (en) 2018-10-10 2021-02-09 Micron Technology, Inc. Counter-based compaction of key-value store tree data block
US11100071B2 (en) * 2018-10-10 2021-08-24 Micron Technology, Inc. Key-value store tree data block spill with compaction
US11256696B2 (en) * 2018-10-15 2022-02-22 Ocient Holdings LLC Data set compression within a database system
US11048755B2 (en) 2018-12-14 2021-06-29 Micron Technology, Inc. Key-value store tree with selective use of key portion
US10852978B2 (en) 2018-12-14 2020-12-01 Micron Technology, Inc. Key-value store using journaling with selective data storage format
US10936661B2 (en) 2018-12-26 2021-03-02 Micron Technology, Inc. Data tree with order-based node traversal

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013061739A (ja) * 2011-09-12 2013-04-04 Fujitsu Ltd データ管理装置、データ管理システム、データ管理方法、及びプログラム
WO2015072025A1 (ja) * 2013-11-18 2015-05-21 株式会社日立製作所 計算機システム、計算機システム管理方法及びプログラム

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8234391B2 (en) * 2006-09-20 2012-07-31 Reuters America, Llc. Messaging model and architecture
US8595130B2 (en) 2008-12-05 2013-11-26 Bank Of America Corporation Modifiable mortgage
US9009112B2 (en) * 2010-03-15 2015-04-14 Microsoft Technology Licensing, Llc Reorganization of data under continuous workload
US9805108B2 (en) * 2010-12-23 2017-10-31 Mongodb, Inc. Large distributed database clustering systems and methods

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013061739A (ja) * 2011-09-12 2013-04-04 Fujitsu Ltd データ管理装置、データ管理システム、データ管理方法、及びプログラム
WO2015072025A1 (ja) * 2013-11-18 2015-05-21 株式会社日立製作所 計算機システム、計算機システム管理方法及びプログラム

Also Published As

Publication number Publication date
US10719496B2 (en) 2020-07-21
JPWO2017130377A1 (ja) 2018-02-01
US20180067975A1 (en) 2018-03-08
JP6360634B2 (ja) 2018-07-18

Similar Documents

Publication Publication Date Title
JP6360634B2 (ja) 計算機システム、及び、データ処理方法
US11163727B2 (en) Scalable grid deduplication
US10162843B1 (en) Distributed metadata management
JP5952960B2 (ja) 計算機システム、計算機システム管理方法及びプログラム
JP5701398B2 (ja) 計算機システム、データ管理方法及びプログラム
US20110313971A1 (en) Storage system
US8661055B2 (en) File server system and storage control method
US10146694B1 (en) Persistent cache layer in a distributed file system
US20200341639A1 (en) Lattice layout of replicated data across different failure domains
US11231862B1 (en) Localized lookups for efficient database service request processing
US20220374173A1 (en) Methods for accelerating storage operations using computational network and storage components and devices thereof
KR101527634B1 (ko) 샤딩 서비스를 제공하는 방법 및 장치
US11275717B2 (en) Web-scale distributed deduplication
US11294931B1 (en) Creating replicas from across storage groups of a time series database
US11341009B1 (en) Directing placement of data in cloud storage nodes
JP2011232840A (ja) アクセス制御情報管理方法、計算機システム及びプログラム
US11194501B2 (en) Standby copies withstand cascading fails
US20220391411A1 (en) Dynamic adaptive partition splitting
WO2017188929A1 (en) Method and apparatus for replicating data between storage systems
US11188258B2 (en) Distributed storage system
JP6007340B2 (ja) 計算機システム、計算機システム管理方法及びプログラム
US11675523B2 (en) Remote copy of compressed journal data and corresponding metadata
JP6055197B2 (ja) データベースシステム
WO2021187194A1 (ja) 分散処理システム、分散処理システムの制御方法、及び、分散処理システムの制御装置
US11860835B1 (en) Efficient drop column requests in a non-relational data store

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2017544685

Country of ref document: JP

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 15561214

Country of ref document: US

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16887964

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16887964

Country of ref document: EP

Kind code of ref document: A1