This paper analyzes the adoption of unstructured P2P overlay networks to build resource discovery services. We consider a simple distributed communication protocol, which is based on gossip and on the local knowledge each node has about resources hold by its neighbors. In particular, upon reception (or generation) of a novel query, a node relays the message to those neighbors that have resources whose profile matches the query. Moreover, the node gossips the query to other remaining neighbors, so that the query can be disseminated through the overlay. A mathematical analysis is provided to estimate the number of nodes receiving the query (and consequently, the portion of query hits), based on the network topology, resource availability and ...