The disclosure provides an approach for load balancing packets within a data center. The approach leverages dynamically collected and up-to-date health information on each virtual computing instance located within the data center. In one embodiment, health monitoring modules, located within hypervisors of each host computer, collect health statistics on local virtual computing instances. Each health monitoring module shares its locally collected health statistics with every other health monitoring module. Each health monitoring module provides the shared health statistics, on all virtual computing instances within the data center, to a local load balancing module located within the hypervisor of each host computer. Each load balancing module uses health statistics of all virtual computing instances to load balance packets within the data center. Further, the disclosure describes an affinity-based load balancing approach in which a local load balancing module may give preference to local virtual computing instances when making load balancing decisions.
展开▼