-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cache): mlcache invalidation use separate cluster event channels …
…to avoid useless invalidation (#12321) Currently, the kong_db_cache and kong_core_db_cache use the same invalidations channel named "invalidations" in the cluster event hook. In a traditional cluster(in which multiple Kong nodes use the same database and communicate with each other through cluster events), whenever an invalidation happens on a node A, any other single node X in the cluster will call invalidate_local on both kong_db_cache and kong_core_db_cache although the entity usually exists in only one cache, thus generates useless worker events. The PR tries to separate every kong.cache instance to use its own invalidations channel to avoid generating useless "invalidations" worker events in a traditional cluster. - Leave the existing channel "invalidation" only for kong.cache - Create a separate channel for the kong.core_cache(and other cache instances if any) * fix(cache): mlcache invalidation use split cluster event channels to avoid useless invalidation * docs(changelog): add changelog * fix(*): preserve old invalidate channel for kong_db_cache * docs(changelog): reword changelog * fix(*): stash invalidation channel in cache obj * docs(*): remove invalidate deprecate changelog * style(*): remove extra blank line
- Loading branch information
Showing
4 changed files
with
30 additions
and
14 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
changelog/unreleased/kong/separate_kong_cache_invalidation_cluster_event_channel.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
message: | | ||
Each Kong cache instance now utilizes its own cluster event channel. This approach isolates cache invalidation events and reducing the generation of unnecessary worker events. | ||
type: bugfix | ||
scope: Core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters