-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
4 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 |
---|---|---|
@@ -1,4 +1,19 @@ | ||
```metrics | ||
system.fn_duration_ms{service=api} | ||
system.fn_duration_ms{service=db} | ||
``` | ||
# Cache Stampede | ||
|
||
In this scenario, we look into cache stampede caused by cache flush. | ||
|
||
## Setup | ||
|
||
The system consist of an API server, a cache, and a database. | ||
|
||
Database query is slow (~20ms), and cache query is fast (~1ms). | ||
|
||
|
||
## Useful metrics | ||
|
||
- [API latency](lab:metrics?q=system.fn_duration_ms{service=api}) | ||
- [DB latency](lab:metrics?q=system.fn_duration_ms{service=db}) | ||
- [DB load](lab:metrics?q=system.node_load{service=db}) | ||
- [Cache latency](lab:metrics?q=system.fn_duration_ms{service=cache}) | ||
- [Cache hits](lab:metrics?q=services.cache.hit) | ||
- [Cache misses](lab:metrics?q=services.cache.miss) |