Skip to content

v0.14.29

Choose a tag to compare

@zalando-robot zalando-robot released this 02 Jan 17:39
9b66e27

Changes

filters/auth: add tokenInfo cache (#2142)
When enabled caches tokeninfo for the duration of "expires_in" field value seconds or for the duration of the configured time-to-live (TTL) if it is not zero and less than "expires_in" value.
It evicts least recently used entry when number of cached entries reaches configured size boundary.

$ go test github.com/zalando/skipper/filters/auth -run=NONE -bench=BenchmarkTokeninfoCache -count=1
goos: linux
goarch: amd64
pkg: github.com/zalando/skipper/filters/auth
cpu: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
BenchmarkTokeninfoCache/tokens=1,cacheSize=1,p=0-8               1560343               646.0 ns/op           344 B/op          3 allocs/op
BenchmarkTokeninfoCache/tokens=2,cacheSize=2,p=0-8               1500441               793.3 ns/op           344 B/op          3 allocs/op
BenchmarkTokeninfoCache/tokens=100,cacheSize=100,p=0-8           1506963               811.9 ns/op           344 B/op          3 allocs/op
BenchmarkTokeninfoCache/tokens=100,cacheSize=100,p=10000-8       1802880               655.4 ns/op           365 B/op          3 allocs/op
BenchmarkTokeninfoCache/tokens=4,cacheSize=2,p=0-8                   426           2592878 ns/op              27 B/op          0 allocs/op
BenchmarkTokeninfoCache/tokens=100,cacheSize=10,p=0-8                416           2555909 ns/op              26 B/op          0 allocs/op

Docker image

Docker image is available in Zalando's Open Source registry:

docker run -it registry.opensource.zalan.do/teapot/skipper:v0.14.29 skipper --help
# arm64
docker run -it registry.opensource.zalan.do/teapot/skipper-arm64:v0.14.29 skipper --help
# arm v7 32bit
docker run -it registry.opensource.zalan.do/teapot/skipper-armv7:v0.14.29 skipper --help