1. A computer-implemented method comprising: retrieving a social graph including a plurality of nodes and a plurality of edges, each of the nodes corresponding to a member in a social network service and each of the edges representing a connection between members of the social network service; for each node of the plurality of nodes in the social graph: creating a partial graph for the node; determining a list of the nodes reachable in one hop from the node; adding the list of nodes reachable in one hop to a first degree list for the partial graph; determining a list of nodes reachable in two hops from the node, and reference counts as to how many paths exist between the node and each of the nodes reachable in two hops from the node; and adding the list of nodes reachable in two hops and the reference counts to a second degree list for the partial graph; maintaining a global inverted index containing a list of all nodes in the social graph and for each node in the social graph a list of nodes that directly connect to the node in the social graph; distributing the partial graphs created for each of the plurality of nodes across a plurality of data servers; and maintaining an index of which partial graphs are stored on which data servers.