1. A method performed for assigning compute nodes to data nodes, the method comprising: obtaining a set of compute nodes, a set of data nodes, and a set of edges between compute nodes and data nodes; determining an assignment objective to be achieved in assigning compute nodes from the set of compute nodes to data nodes from the set of data nodes; applying an algorithm associated with the assignment objective to obtain a set of assignments based on a plurality of costs associated with the set of edges; and assigning a compute node of the set of compute nodes to a data node of the set of data nodes based on the set of assignments.