This repository has been archived by the owner on Aug 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(prometheus) use lua-resty-counter on hotpath counter increments
Previously counters in prometheus plugin are implemented with shm counters. Multiple shm operations happen with request, and each requires shm level lock across all workers. The lock overhead is especially noticable while running Kong with large amount of cores. To improve performance, prometheus plugin now uses [lua-resty-counter](https://github.com/kong/lua-resty-counter) for counter and histogram metrics. It replaces per request shm operation with cheaper worker level Lua numbers and sync to shm timely. From #69 For #61 For #43
- Loading branch information
Showing
4 changed files
with
50 additions
and
19 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -13,6 +13,7 @@ description = { | |
} | ||
|
||
dependencies = { | ||
"lua-resty-counter >= 0.2.0", | ||
--"kong >= 0.13.0", | ||
} | ||
|
||
|
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