fix: populate algorithm of Upstream for Kong >= 1.3.0 #480
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.
The
algorithm
in theupstream
entity defaults toround-robin
.This field was introduced in Kong 1.3.0.
If this field is not set, decK finds a diff between the current state
and target state and issues a PUT request to Kong, updating the upstream
in Kong's database.
This leads to a cache invalidation and rebuilt of upstreams in Kong,
causing performance degradation.
The code now injects the algorithm based on the version of Kong (or Kong
Enterprise). Kong Enterprise 1.3.0.0 will also pick this change
correctly.