-
Bug
-
Resolution: Done
-
Blocker
-
httpd 2.4.29 GA
-
None
-
26
-
-
-
-
-
-
+
-
If a configuration contains many VirtualHosts (100+), there is notable CPU spikes seen in httpd processes when JBoss instances stop/start and cause balancer changes. It looks like there is O(n^2) complexity here where n is the VirtualHost counts.
add_balancers_workers loops for each VirtualHost and calls create_worker each time. Note that with CreateBalancers 2, the other vhosts always have a balancer once it's populatedi n the main_server, so this check never skips any work for the vhosts:
if (!balancer && (creat_bal == CREAT_NONE || (creat_bal == CREAT_ROOT && s!=main_server))) { s = s->next; continue; }
So add_balancers_workers is O( n ). proxy_cluster_watchdog_func and proxy_cluster_child_init call update_workers_node/add_balancers_workers for each vhost as well for n^2 complexity.