Patent attributes
Some embodiments of the invention provide a novel architecture for capturing contextual attributes on host computers that execute one or more machines and for consuming the captured contextual attributes to perform services on the host computers. The machines are virtual machines (VMs) in some embodiments, containers in other embodiments, or a mix of both VMs and containers in still other embodiments. Some embodiments execute a guest-introspection (GI) agent on each machine from which contextual attributes need to be captured. In addition to executing one or more machines on each host computer, these embodiments also execute a context engine and one or more attribute-based service engines on each host computer. One of these service engines is a load balancer. Through the GI agents of the machines on a host, the context engine of that host in some embodiments collects contextual attributes associated with network events and/or process events on the machines. The context engine then provides the contextual attributes to the load balancer, which, in turn, uses these contextual attributes to identify load-balancing rules that specify how the data messages should be distributed in a load-balanced manner.