The present invention relates to the field of
data processing, and particularly to a distributed method and device for
processing a
data stream, which are used for solving the problem that the distributed
stream processing technology cannot conduct load balancing
processing on data streams having the same key value. The method in the embodiments of the present invention comprises: according to a key value of a
data stream which needs to be allocated to a next-hop work node, a first node determining a second node as the next-hop work node for processing a
data stream corresponding to the key value, and after it is determined that the second node satisfies a set load migration condition, migrating the data
stream, which needs to be allocated to the next-hop work node, to a third node for processing from the second node, and indicating that the second node and the third node are
synchronizing state information about the data
stream corresponding to the key value. By means of the method, after it is determined that a downstream second node satisfies a set load migration condition, a first node can migrate a data stream corresponding to the key value, which is mainly processed by the second node, to a third node for processing with a small accumulated load at present, so that load balancing processing can be conducted on data streams with the same key value.