Attempt to batch config loading for tron deployments #3956
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now we make at most 2N calls to the Tron API during config deployments: N to get the current configs and at most N if all services have changes.
To start, I'd like to reduce this to N by allowing GET /api/config to return all the configs so that the only requests needed are POSTs for changed configs. Since I'm a little worried about how tron-pnw-prod will fare with returning all the configs in a single request, using this new endpoint is behind a feature toggle. Hopefully this works out and we don't need to add pagination to the endpoint :)
Depending on how this goes, we can look into batching up the POSTs so that we can also do that in a single request (or at least <N requests if we want to chunk things a bit more).
NOTE: this requires Yelp/Tron#996