Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. Query flooding is
a method to search for a resource on a P2P network. It is simple but
scales very poorly and thus is rarely used. Early versions of the
Gnutella protocol operated by query flooding; newer versions use more
efficient search algorithms.A P2P network generally consists of a large
number of nodes each connected not to all other nodes, but a small
subset of the nodes. If a node wants to find a resource on the network,
which may be on a node it does not know about, it could simply broadcast
its search query to its immediate neighbours. If the neighbours do not
have the resource, it then asks its neighbours to forward the query to
their neighbours in turn. This is repeated until the resource is found
or all the nodes have been contacted, or perhaps a network-imposed hop
limit is reached.