-
Notifications
You must be signed in to change notification settings - Fork 595
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 auth performance degradation in >= v0.14.0 / cache Google auth client per config #674
Comments
Take a look at #661. It might be what you're referring to. Let us know if/if not that's the case. |
@ryanseys Ah yes, that's it! Apologies for not seeing it. I'll close this out as a dupe. |
4 tasks
sofisl
pushed a commit
that referenced
this issue
Oct 11, 2022
🤖 I have created a release *beep* *boop* --- ## [5.0.1](googleapis/nodejs-language@v5.0.0...v5.0.1) (2022-06-30) ### Bug Fixes * **docs:** describe fallback rest option ([#673](googleapis/nodejs-language#673)) ([6767804](googleapis/nodejs-language@6767804)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
sofisl
pushed a commit
that referenced
this issue
Oct 13, 2022
🤖 I have created a release *beep* *boop* --- ## [5.0.1](googleapis/nodejs-language@v5.0.0...v5.0.1) (2022-06-30) ### Bug Fixes * **docs:** describe fallback rest option ([#673](googleapis/nodejs-language#673)) ([6767804](googleapis/nodejs-language@6767804)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
4 tasks
sofisl
pushed a commit
that referenced
this issue
Nov 10, 2022
sofisl
pushed a commit
that referenced
this issue
Nov 17, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The v0.14.0 release of this module included a change in the underlying dependency used for Google authentication, from the
google-service-account
module togoogle-auth-library
(see eae1b7d). During routine service benchmarking as part of our upgrade to v0.15.0, I noticed a 50% decrease in throughput for our proxy server when asked to serve 10k small files.A super-simple example is shown below, which directly calls into
utils.makeAuthorizedRequest(...)
. This script makes 100 requests to GCS for file metadata, serially, and exits on completion. On v0.13.2, this script successfully completes in ~20-25 seconds, while in v0.14.0 and v0.15.0 it completes in ~45-50 seconds.This difference is fully accounted for through additional time spent in
util.authorizeRequest(...)
. On v0.13.2, the call toauthorize(...)
is essentially a no-op if you are using a service account credential, and network I/O is not required.This is caused by creating a new instance of
GoogleAuth
inutil.getAuthClient(...)
, effectively blowing away the cached bearer token and causing a new one to be generated for each request.I'll follow-up with a PR addressing this issue in the next 24 hours.
The text was updated successfully, but these errors were encountered: