Reciprocity is the basis for cooperation between agents in settings without payments. Research has shown that cooperation through reciprocity can emerge if reputation information is available. Various reputation mechanisms have been proposed, which are either not efficient or vulnerable to errors in perception. We propose a reputation mechanism based on centrality, which outperforms existing mechanisms in terms of efficiency and robustness. To evaluate our approach, we first conduct numerical simulations where we analyze different centrality measures. We then use the `winning' measure in a behavioral experiment to evaluate its effectiveness with real users. Our results are that distance-based centrality measures are most suitable for multi-agent systems. Furthermore, humans adopt strategies based on centrality for sending requests, but not for processing them.