Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sapcc/swift-s3-cache-prewarmer
Cache prewarmer for the Swift s3token middleware
https://github.com/sapcc/swift-s3-cache-prewarmer
Last synced: 11 days ago
JSON representation
Cache prewarmer for the Swift s3token middleware
- Host: GitHub
- URL: https://github.com/sapcc/swift-s3-cache-prewarmer
- Owner: sapcc
- License: apache-2.0
- Created: 2020-12-17T13:13:40.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T13:13:54.000Z (7 months ago)
- Last Synced: 2024-04-12T20:31:09.570Z (7 months ago)
- Language: Go
- Size: 4.72 MB
- Stars: 4
- Watchers: 41
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# swift-s3-cache-prewarmer
[![CI](https://github.com/sapcc/swift-s3-cache-prewarmer/actions/workflows/ci.yaml/badge.svg)](https://github.com/sapcc/swift-s3-cache-prewarmer/actions/workflows/ci.yaml)
We have a few customers making extensive use of the S3 API in our [Swift](https://github.com/openstack/swift) cluster.
To avoid putting too much load on Keystone, Swift can cache S3 credentials in a Memcache. However, when the customer
traffic is high enough to keep multiple parallel Swift API workers busy, once a cache entry expires, they all hit
Keystone simultaneously. To avoid this high request load on Keystone caused by expiring cache entries, this tool
periodically refreshes the cache entries so that they never expire.## Usage
Build with `make/make install` or `go get` or `docker build`. Check out the `--help` for how to run this.
## Metrics
The `prewarm` command exposes two gauges for each credential that was prewarmed:
- `swift_s3_cache_prewarm_last_run_secs`: UNIX timestamp in seconds of last successful cache prewarm (or 0 before the first successful prewarm)
- `swift_s3_cache_prewarm_duration_secs`: duration in seconds of last successful cache prewarm (or absent before the first successful prewarm)Each time series has the labels `userid` and `accesskey` identifying the credential in question.