Method, apparatus, and system for scheduling distributed buffer resources
AssigneeHuawei Technologies Co., Ltd.
InventorPu Chen
Life of this patent
Estimating the term…
Abstract
A method for scheduling distributed buffer resources is provided, where in the distributed buffer system, each buffer node is distributed on a virtual circle that is based on a consistent hashing algorithm, and the method includes: monitoring a load value of each buffer node in the distributed buffer system; judging whether a load exception exists in the current distributed buffer system according to the load value; and if the load exception exists in the current distributed buffer system, adjusting a layout of the buffer nodes in the distributed buffer system.
Claims14
A method for scheduling distributed buffer resources within a distributed buffer system, the distributed buffer system comprising a buffer management node and multiple buffer nodes for storing data, and the method comprising:
- distributing, by the buffer management node, the multiple buffer nodes on a virtual circle that is based on a consistent hashing algorithm, wherein each buffer node covers a hash segment on the virtual circle;
- determining, by the buffer management node, a home buffer node of data to be stored according to a home hash segment, wherein the home hash segment corresponds to a hash value of a key of the data to be stored;
- saving, by the buffer management node, the data to be stored on the home buffer node;
- determining, by the buffer management node, a load imbalance which exists in the distributed buffer system according to load values of the multiple buffer nodes;
- selecting, by the buffer management node, at least one pair of adjacent buffer nodes with a maximum load difference on the virtual circle from the existing multiple buffer nodes on the virtual circle;
- and
- moving a location of the selected buffer nodes to change hash segment coverage of the selected buffer nodes.
A buffer management node in a distributed buffer system
- the buffer management node is configured to:
- distribute multiple buffer nodes on a virtual circle that is based on a consistent hashing algorithm, wherein each buffer node covers a hash segment on the virtual circle,
- determine a home buffer node of data to be stored according to a home hash segment, wherein the home hash segment corresponds to a hash value of a key of the data to be stored, and
- save the data to be stored on the home buffer node, and the buffer management node further comprising:
- a judging unit, which determines a load imbalance exists in the distributed buffer system according to load values of the multiple buffer nodes;
- and
- an adjustment unit, which selects at least one pair of adjacent buffer nodes with a maximum load difference on the virtual circle from the existing multiple buffer nodes on the virtual circle, and moves a location of at least one buffer node to change hash segment coverage of the at least one buffer node.
A method for scheduling distributed buffer resources within a distributed buffer system, the distributed buffer system comprising a buffer management node and multiple buffer nodes for storing data, and the method comprising:
- distributing by the buffer management node, the multiple buffer nodes on a virtual circle that is based on a consistent hashing algorithm, wherein each buffer node covers a hash segment on the virtual circle;
- determining by the buffer management node, a home buffer node of data to be stored according to a home hash segment, wherein the home hash segment corresponds to a hash value of a key of the data to be stored;
- saving by the buffer management node, the data to be stored on the home buffer node;
- adjusting by the buffer management node, a layout of the multiple buffer nodes on the virtual circle, in order to change hash segment coverage of at least one buffer node of the multiple buffer nodes;
- determining by the buffer management node, a first hash segment on the virtual circle, wherein the first hash segment is covered by an old buffer node of the multiple buffer nodes before an adjusting of the layout, and covered by a new buffer node within the buffer distributed resources of the multiple buffer nodes after the adjusting of the layout;
- sending by the buffer management node, a notification message to the new buffer node, wherein the notification message comprises location information of the old buffer node;
- receiving, by the new buffer node, the notification message sent by the buffer management node;
- and
- visiting by the new buffer node, the old buffer node according to the location information of the old buffer node to acquire a first data, wherein a hash value of a key of the first data belongs to the first hash segment, and the old buffer node store the first data before the adjusting of the layout.
A distributed buffer system, comprising a buffer management node and multiple buffer nodes;
- wherein
- the buffer management node, configured to:
- distribute the multiple buffer nodes on a virtual circle that is based on a consistent hashing algorithm, wherein each buffer node covers a hash segment on the virtual circle,
- determine a home buffer node of data to be stored according to a home hash segment, wherein the home hash segment corresponds to a hash value of a key of the data to be stored, save the data to be stored on the home buffer node,
- adjust a layout of the multiple buffer nodes on the virtual circle, in order to change hash segment coverage of at least one buffer node of the multiple buffer nodes,
- determine a first hash segment on the virtual circle, wherein the first hash segment is covered by an old buffer node of the multiple buffer nodes before an adjusting of the layout and covered by a new buffer node of the multiple buffer nodes after the adjusting of the layout, and
- send a notification message to the new buffer node comprising location information of the old buffer node;
- wherein the new buffer node, configured to:
- receive the notification message sent by the buffer management apparatus, and visit the old buffer node according to the location information of the old buffer node to acquire a first data,
- wherein a hash value of a key of the first data belongs to the first hash segment, and the old buffer node store the first data before the adjusting of the layout.
Dependencies are inferred from the claim text.