  We consider load balancing in large-scale heterogeneous server systems in the
presence of data locality that imposes constraints on which tasks can be
assigned to which servers. The constraints are naturally captured by a
bipartite graph between the servers and the dispatchers handling assignments of
various arrival flows. When a task arrives, the corresponding dispatcher
assigns it to a server with the shortest queue among $d\geq 2$ randomly
selected servers obeying the above constraints. Server processing speeds are
heterogeneous and they depend on the server-type. For a broad class of
bipartite graphs, we characterize the limit of the appropriately scaled
occupancy process, both on the process-level and in steady state, as the system
size becomes large. Using such a characterization, we show that data locality
constraints can be used to significantly improve the performance of
heterogeneous systems. This is in stark contrast to either heterogeneous
servers in a full flexible system or data locality constraints in systems with
homogeneous servers, both of which have been observed to degrade the system
performance. Extensive numerical experiments corroborate the theoretical
results.
