rawlinp opened a new issue #5212: URL: https://github.com/apache/trafficcontrol/issues/5212
## I'm submitting a ... - improvement request (usability, performance, tech debt, etc.) ## Traffic Control components affected ... - Traffic Ops ## Current behavior: TO currently makes a DB request per server in the `ValidateServerCapabilities()` function: https://github.com/apache/trafficcontrol/blob/b99eda51b03505f48d67aadf481d16470455a7f4/traffic_ops/traffic_ops_golang/deliveryservice/servers/servers.go#L541. When a delivery service is being assigned to a large number of servers, this slows down the total execution time unnecessarily. ## New behavior: Instead of making a DB request per server, the function should make a single DB request to get data for all the servers at once, then perform the validation. This will make it much faster to assign a delivery service to large numbers of servers at a time. ## Minimal reproduction of the problem with instructions: Assign a delivery service with required capabilities to a large number of servers with those capabilities at a time. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
