-
Bug
-
Resolution: Done
-
Major
-
1.3.14.Final
-
None
internal_find_best_byrequests scales inefficiently with balancer members currently. This is from repeating find_node_context_host (it loops per JVM count in this method) from context_host_ok calls that were looped over in internal_find_best_byrequests by the JVM count, making this an O(n^2) operation where n is the JVM count. This can heavily degrade performance of any requests that aren't stickied.
With 500 members, I can see it approaching 80 ms just for this portion of the request with a single user load (and this scales even worse as load increases):
[Tue Jul 05 14:49:18.114559 2022] [:debug] [pid 507115:tid 139847549314816] mod_proxy_cluster.c(3184): proxy_cluster_pre_request begin
[Tue Jul 05 14:49:18.181707 2022] [:debug] [pid 507115:tid 139847549314816] mod_proxy_cluster.c(1963): proxy: byrequests balancer DONE (ajp://127.0.0.1:9000)
- is related to
-
MODCLUSTER-764 avoid repeat context_host_ok/find_node_context_host calls
- Open
-
MODCLUSTER-767 internal_find_best_byrequests scales inefficiently with many matching balancer members
- Open