You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/10/28 16:21:33 UTC

[GitHub] [trafficcontrol] rawlinp opened a new issue #5212: Reduce the number of DB requests made in ValidateServerCapabilities()

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:
users@infra.apache.org



[GitHub] [trafficcontrol] RaviTezu edited a comment on issue #5212: Reduce the number of DB requests made in ValidateServerCapabilities()

Posted by GitBox <gi...@apache.org>.
RaviTezu edited a comment on issue #5212:
URL: https://github.com/apache/trafficcontrol/issues/5212#issuecomment-718842147


   @rawlinp Just want to check that I am going in the right direction before I start on this.
   - I am thinking of modifying `GetServerCapabilitiesFromName` method to take a list of server names and then modify the query in way that I can fetch the data/capabilities for all the servers and return them for validation. 
   - Also, I would like to know where I can get more information on how to construct the query. Thanks. 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [trafficcontrol] RaviTezu edited a comment on issue #5212: Reduce the number of DB requests made in ValidateServerCapabilities()

Posted by GitBox <gi...@apache.org>.
RaviTezu edited a comment on issue #5212:
URL: https://github.com/apache/trafficcontrol/issues/5212#issuecomment-718842147


   @rawlinp Just want to check that I am going in the right direction before I start on this.
   - I am thinking of adding a modifying `GetServerCapabilitiesFromName` method to take a list of server names and then modify the query in way that I can fetch the data/capabilities for all the servers and return them for validation. 
   - Also, I would like to know where I can get more information on how to construct the query. Thanks. 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [trafficcontrol] RaviTezu edited a comment on issue #5212: Reduce the number of DB requests made in ValidateServerCapabilities()

Posted by GitBox <gi...@apache.org>.
RaviTezu edited a comment on issue #5212:
URL: https://github.com/apache/trafficcontrol/issues/5212#issuecomment-718842147


   @rawlinp Just want to check that I am going in the right direction before I start on this.
   - I am thinking of modifying `GetServerCapabilitiesFromName` method to take a list of server names and then modify the query in way that it can fetch the data/capabilities for all the servers and return them for validation. 
   - Also, I would like to know where I can get more information on how to construct the query. Thanks. 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [trafficcontrol] rawlinp commented on issue #5212: Reduce the number of DB requests made in ValidateServerCapabilities()

Posted by GitBox <gi...@apache.org>.
rawlinp commented on issue #5212:
URL: https://github.com/apache/trafficcontrol/issues/5212#issuecomment-718858811


   @RaviTezu that sounds like a reasonable idea. This query should be a good example for you to modify for `GetServerCapabilitiesFromName`: https://github.com/apache/trafficcontrol/blob/b99eda51b03505f48d67aadf481d16470455a7f4/traffic_ops/traffic_ops_golang/deliveryservice/deliveryservices_required_capabilities.go#L348-L360


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [trafficcontrol] RaviTezu commented on issue #5212: Reduce the number of DB requests made in ValidateServerCapabilities()

Posted by GitBox <gi...@apache.org>.
RaviTezu commented on issue #5212:
URL: https://github.com/apache/trafficcontrol/issues/5212#issuecomment-718842147


   @rawlinp Just want to check I am going in the right direction before I start on this.
   - I am thinking of adding a modifying `GetServerCapabilitiesFromName` method to take a list of server names and then modify the query in way that I can fetch the data/capabilities for all the servers and return them for validation. 
   - Also, I would like to know where I can get more information on how to construct the query. Thanks. 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [trafficcontrol] RaviTezu commented on issue #5212: Reduce the number of DB requests made in ValidateServerCapabilities()

Posted by GitBox <gi...@apache.org>.
RaviTezu commented on issue #5212:
URL: https://github.com/apache/trafficcontrol/issues/5212#issuecomment-718113979


   @rawlinp I would like to take this up. Could you please assign this to me? 


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [trafficcontrol] zrhoffman closed issue #5212: Reduce the number of DB requests made in ValidateServerCapabilities()

Posted by GitBox <gi...@apache.org>.
zrhoffman closed issue #5212:
URL: https://github.com/apache/trafficcontrol/issues/5212


   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org