1. A computer-implemented method of allocating a plurality of objects associated with an online service to a plurality of network elements, comprising: receiving log data relating to usage of the online service; inferring a relationship graph from the log data, the graph comprising a node for each object and connections between each pair of objects having at least one associated data item in common, each connection having a weight relating to the number of common data items; partitioning the graph into a set of clusters, such that each cluster comprises nodes joined by connections with a high weight relative to the weight of connections between nodes in different clusters; and distributing one or more of the objects to the network elements such that objects corresponding to nodes in the same cluster are located on the same network element.