diff --git a/.changeset/implement_jwt_claims_caching_to_avoid_re_parsing_on_every.md b/.changeset/implement_jwt_claims_caching_to_avoid_re_parsing_on_every.md deleted file mode 100644 index cd86048d..00000000 --- a/.changeset/implement_jwt_claims_caching_to_avoid_re_parsing_on_every.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -router: minor ---- - -# JWT claims caching for improved performance - -**Performance improvement:** JWT token claims are now cached for up to 5 seconds, reducing the overhead of repeated decoding and verification operations. This optimization increases throughput by approximately 75% in typical workloads. - -**What's changed:** -- Decoded JWT payloads are cached with a 5-second time-to-live (TTL), which respects token expiration times -- The cache automatically invalidates based on the token's `exp` claim, ensuring security is maintained - -**How it affects you:** -If you're running Hive Router, you'll see significant performance improvements out of the box with no configuration needed. The 5-second cache provides an optimal balance between performance gains and cache freshness without requiring manual tuning. diff --git a/Cargo.lock b/Cargo.lock index fca0fa73..99e56eb9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2010,7 +2010,7 @@ dependencies = [ [[package]] name = "hive-router" -version = "0.0.17" +version = "0.0.18" dependencies = [ "arc-swap", "async-trait", diff --git a/bin/router/CHANGELOG.md b/bin/router/CHANGELOG.md index 6dae117d..867df288 100644 --- a/bin/router/CHANGELOG.md +++ b/bin/router/CHANGELOG.md @@ -116,6 +116,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Other - *(deps)* update release-plz/action action to v0.5.113 ([#389](https://github.com/graphql-hive/router/pull/389)) +## 0.0.18 (2025-11-18) + +### Features + +#### JWT claims caching for improved performance + +**Performance improvement:** JWT token claims are now cached for up to 5 seconds, reducing the overhead of repeated decoding and verification operations. This optimization increases throughput by approximately 75% in typical workloads. + +**What's changed:** +- Decoded JWT payloads are cached with a 5-second time-to-live (TTL), which respects token expiration times +- The cache automatically invalidates based on the token's `exp` claim, ensuring security is maintained + +**How it affects you:** +If you're running Hive Router, you'll see significant performance improvements out of the box with no configuration needed. The 5-second cache provides an optimal balance between performance gains and cache freshness without requiring manual tuning. + ## 0.0.17 (2025-11-04) ### Fixes diff --git a/bin/router/Cargo.toml b/bin/router/Cargo.toml index 189ee8c3..14688130 100644 --- a/bin/router/Cargo.toml +++ b/bin/router/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hive-router" -version = "0.0.17" +version = "0.0.18" edition = "2021" description = "GraphQL router/gateway for Federation" license = "MIT"