Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: sort and check hash to reduce number of sync operations #484

Merged
merged 2 commits into from
Dec 16, 2019

Conversation

hbagdi
Copy link
Member

@hbagdi hbagdi commented Dec 10, 2019

No description provided.

Doing a sync to Kong in DB or in-memory mode, both are expensive
operations and should be avoided if there is no change happening.

In a k8s cluster, pods, services change quite often and lead to a lot of
events to this controller, which lead to frequent unnecessary reloads.

This patch deterministically sorts the final configuration and then
caches the hash, which is then compared in the next iteration to avoid a
sync if possible.

This change piggybacks on the previous commit which consolidates the DB
and DB-less mode into one data-structure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant