Scalable, real-time messaging system
Abstract
Methods, systems, and apparatus, including computer programs encoded on a computer storage medium, for balancing loads in a publish-subscribe system. An example method includes identifying, by one or more computer processors, a first node from a plurality of nodes in a publish-subscribe system based at least in pan on (i) node-specific data representing loads on the plurality of nodes and (ii) channel-specific data representing a load associated with a channel comprising a channel portion to be temporarily offloaded from a second node. The method also includes selecting, by the one or more computer processors, the first node to temporarily host the channel portion of the channel. The method further includes receiving a request to access the channel portion, and granting the request to access the channel portion.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method, comprising:
identifying, by one or more computer processors, a first node from a plurality of nodes in a publish-subscribe system based at least in part on (i) node-specific data representing loads on the plurality of nodes and (ii) channel-specific data representing a load associated with a channel comprising a channel portion to be temporarily offloaded from a second node; selecting, by the one or more computer processors, the first node to temporarily host the channel portion of the channel; receiving a request to access the channel portion; and granting the request to access the channel portion.
2 . The method of claim 1 , wherein the node-specific data comprises at least one of: a number of channel portions being temporarily hosted by the respective nodes, a data reception rate of the respective nodes, a data transmission rate of the respective nodes, a storage utilization of the respective nodes, or a processing rate of the respective nodes.
3 . The method of claim 1 , wherein the channel-specific data comprises at least one of: a number of subscribers to the channel, a number of publishers to the channel, a rate at which messages are published to the channel, a rate at which messages are read from the channel, a number of nodes having permission to access the channel, or a channel portion size for the channel.
4 . The method of claim 1 , wherein selecting the first node to temporarily host the channel portion of the channel comprises:
sending a request to the first node to temporarily host the channel portion of the channel.
5 . The method of claim 4 , wherein the request to the first node to temporarily host the channel portion comprises an indication for one or more messages published to the channel to be temporarily stored and for access to the one or more messages to be temporarily provided to a plurality of subscribers, and wherein the one or more messages were previously stored on the second node.
6 . The method of claim 1 , comprising:
receiving at least a portion of the node-specific data from the plurality of nodes.
7 . The method of claim 1 , comprising:
determining at least a portion of the node-specific data based on received requests to access the channel portion and on granted requests to access the channel portion.
8 . The method of claim 1 , wherein identifying the first node from the plurality of nodes comprises:
determining, based at least in part on the node-specific data, that a load on the first node is lowest among respective loads on the nodes; and identifying the first node based on the determination.
9 . The method of claim 1 , wherein identifying the first node from the plurality of nodes comprises:
determining, based at least in part on the node-specific data, that a load on the first node is below a threshold load level; and identifying the first node based on the determination.
10 . The method of claim 1 , wherein selecting the first node from the plurality of nodes comprises:
determining, based at least in part on a portion of the node-specific data corresponding to the first node and on a portion of the channel-specific data corresponding to the channel, an expected load on the first node that would result from the first node hosting the portion of the channel; determining that the expected load on the first node is below a threshold load level; and identifying the first node based on the determination that the expected load on the first node is below the threshold load level.
11 . A system, comprising:
one or more computer processors programmed to perform operations to:
identify a first node from a plurality of nodes in a publish-subscribe system based at least in part on (i) node-specific data representing loads on the plurality of nodes and (ii) channel-specific data representing a load associated with a channel comprising a channel portion to be temporarily offloaded from a second node;
select the first node to temporarily host the channel portion of the channel;
receive a request to access the channel portion; and
grant the request to access the channel portion.
12 . The system of claim 11 , wherein the node-specific data comprises at least one of: a number of channel portions being temporarily hosted by the respective nodes, a data reception rate of the respective nodes, a data transmission rate of the respective nodes, a storage utilization of the respective nodes, or a processing rate of the respective nodes.
13 . The system of claim 11 , wherein the channel-specific data comprises at least one of: a number of subscribers to the channel, a number of publishers to the channel, a rate at which messages are published to the channel, a rate at which messages are read from the channel, a number of nodes having permission to access the channel, or a channel portion size for the channel.
14 . The system of claim 11 , wherein to select the first node to temporarily host the channel portion of the channel the one or more computer processors are further to:
send a request to the first node to temporarily host the channel portion of the channel.
15 . The system of claim 14 , wherein the request to the first node to temporarily host the channel portion comprises an indication for one or more messages published to the channel to be temporarily stored and for access to the one or more messages to be temporarily provided to a plurality of subscribers, and wherein the one or more messages were previously stored on the second node.
16 . The system of claim 11 , wherein the operations are further to:
receive at least a portion of the node-specific data from the plurality of nodes.
17 . The system of claim 11 , wherein the operations are further to:
determine at least a portion of the node-specific data based on received requests to access the channel portion and on granted requests to access the channel portion.
18 . The system of claim 11 , wherein to identify the first node from the plurality of nodes the one or more computer processors are further to:
determine, based at least in part on the node-specific data, that a load on the first node is lowest among respective loads on the nodes; and identify the first node based on the determination.
19 . The system of claim 11 , wherein to identify the first node from the plurality of nodes the one or more computer processors are further to:
determine, based at least in part on the node-specific data, that a load on the first node is below a threshold load level; and identify the first node based on the determination.
20 . A non-transitory computer-readable medium having instructions stored thereon that, when executed by one or more computer processors, cause the one or more computer processors to:
identify, by the one or more computer processors, a first node from a plurality of nodes in a publish-subscribe system based at least in part on (i) node-specific data representing loads on the plurality of nodes and (ii) channel-specific data representing a load associated with a channel comprising a channel portion to be temporarily offloaded from a second node; select, by the one or more computer processors, the first node to temporarily host the channel portion of the channel; receive a request to access the channel portion; and grant the request to access the channel portion.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.