Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Add support for an attempt to connect to existing Queue on API side to reduce slow requests number #35

Merged
merged 3 commits into from
Nov 28, 2020

Conversation

ArturT
Copy link
Member

@ArturT ArturT commented Nov 28, 2020

problem

The very first request to Queue API is slow due to sending a list of test files from the disk. The bigger the test files list the slower is request. For a few thousand test files it can take 1+ second.

When a lot of requests from parallel CI nodes starting at the same time hit the Knapsack Pro API this can lead to slower performance of the API because requests with a list of test files can be slow. This leads to compound effect and degradation of API performance for very large projects using ~100+ parallel CI nodes.

solution

  • make attempt to connect to the existing Queue on the API side and don't' send a list of test files from the disk
  • if the above attempt failed then send a list of test files from the disk to initialize a new Queue on API side

Thanks to the above we can significantly reduce the number of slow requests and make the overall API more stable.

Related to PR

KnapsackPro/knapsack_pro-ruby#133

@ArturT ArturT added the enhancement New feature or request label Nov 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant