Some embodiments of the invention provide a method for network-aware load balancing for
data messages traversing a
software-defined
wide area network (SD-WAN) (e.g., a
virtual network) including multiple connection links between different elements of the SD-WAN. The method includes receiving, at a load balancer in a multi-
machine site, link state data relating to a set of SD-WAN datapaths including connection links of the multiple connection links. The load balancer, in some embodiments, provides load balancing for
data messages sent from a
machine in the multi-
machine site to a set of destination machines (e.g., web servers,
database servers, etc.) connected to the load balancer over the set of SD-WAN datapaths. The load balancer selects, for the data message, a particular destination machine (e.g., a frontend machine for a set of backend servers) in the set of destination machines by performing a load balancing operation based on the received link state data.