You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "massakam (via GitHub)" <gi...@apache.org> on 2025/04/16 10:03:51 UTC

[PR] [improve] Prefetch role tokens in the background in the Athenz auth plugin [pulsar-client-go]

massakam opened a new pull request, #1355:
URL: https://github.com/apache/pulsar-client-go/pull/1355

   ### Motivation
   
   We use Athenz for authentication between clients and brokers.
   
   When a broker is restarted or a topic is unloaded, connected Pulsar Go clients can send a large number of requests to the Athenz ZTS server at the same time, causing the ZTS server to become overloaded.
   
   The Athenz library used by the authentication plugin caches obtained role tokens for at least two hours to reduce requests to ZTS. However, this cache is only updated when a reconnection occurs between the client and the brokerand is never updated in the background. Therefore, if a broker that has a large number of clients connected for a long time is shut down, all of those clients will simultaneously send requests to ZTS to refresh their role token caches, which have already expired.
   
   ### Modifications
   
   Newer versions of the Athenz library support the feature to periodically fetch role tokens in the background, so I will upgrade the Athenz library and enable this feature.
   https://github.com/AthenZ/athenz/pull/2892
   
   This way, each client's cache is constantly refreshed and does not expire, avoiding a flood of requests to ZTS in response to broker restarting or topic unloading.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   ### Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): yes
     - The public API: no
     - The schema: no
     - The default values of configurations: no
     - The wire protocol: no
   
   ### Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve] Prefetch role tokens in the background in the Athenz auth plugin [pulsar-client-go]

Posted by "nodece (via GitHub)" <gi...@apache.org>.
nodece merged PR #1355:
URL: https://github.com/apache/pulsar-client-go/pull/1355


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org