Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cpu contention on jwk reads + suppress duplicate jwk generation #3870

Merged
merged 1 commit into from
Nov 4, 2024

Commits on Nov 3, 2024

  1. fix: cpu contention when reading JWKs and suppress generating duplica…

    …te JWKs
    
    Previously each concurrent caller would need to lock a shared mutex when reading or writing a given JWK set.
    The read path now doesn't require locking a mutex at all and instead
    returns valid query results directly.
    The write path is now protected by a concurrency control mechanism
    (using x/sync/singleflight) to ensure only one JWK set is generated and
    persisted.
    Note: Duplicate JWK sets may still be improperly generated if running
    more than one Hydra instance in a high traffic environment.
    terev committed Nov 3, 2024
    Configuration menu
    Copy the full SHA
    c41c1ef View commit details
    Browse the repository at this point in the history