A method, carried out by a layer-7 load-balancing subcomponent of an integrated, application-aware load-balancing component of a distributed computer system controlled by a distributed application, the integrated, application-aware load-balancing component including the distributed computer system having multiple computational nodes, each controlled by a local instance of the distributed application that includes a local instance of the integrated, application-aware load-balancing component, a layer-4 load-balancing subcomponent that distributes communications connections from remote processor-controlled client devices to the distributed application among the multiple computational nodes in order to balance the computational load applied to the distributed computer system by the remote processor-controlled client devices, and the layer-7 load-balancing subcomponent, the method comprising:
- periodically computing weights for each computational node;
- and
- using the computed weights to redistribute messages transmitted to the distributed computer system by the remote processor-controlled client devices, directed to the distributed application, and received by one or more of the multiple computational nodes among one or more of the multiple computational nodes in order to balance the computational load applied to the distributed computer system by the remote processor-controlled client devices;
- wherein each of the multiple computational nodes includes a local layer-7 load-balancing subcomponent;
- and
- wherein each local layer-7 load-balancing subcomponent computes weights for each computational node of the multiple computational nodes at points in time separated by one or more weight-computing time intervals based on a number of layer-4-traffic messages received by the computational node that includes the local layer-7 load-balancing subcomponent during an immediately preceding accumulation time interval that is longer than the weight-computing time intervals.