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

perf: Make UrlConnectionHttpClient default client for params fetch #185

Merged
merged 2 commits into from
Nov 26, 2020

Conversation

pankajagrawal16
Copy link
Contributor

@pankajagrawal16 pankajagrawal16 commented Nov 17, 2020

Issue #, if available:

Closes #181

Also https://aws.amazon.com/blogs/developer/tuning-the-aws-java-sdk-2-x-to-reduce-startup-time/

Description of changes:

Checklist

Breaking change checklist

RFC issue #:

  • Migration process documented
  • Implement warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -78,7 +80,10 @@
* Use the {@link SSMProvider.Builder} to create an instance of it.
*/
SSMProvider(CacheManager cacheManager) {
this(cacheManager, SsmClient.create());
this(cacheManager, SsmClient.builder()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the blog post also mention: .region(Region.of(System.getenv(SdkSystemSetting.AWS_REGION.environmentVariable())))

why don't you add it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good point. I can add this too.

@@ -58,7 +60,10 @@
* Use the {@link Builder} to create an instance of it.
*/
SecretsProvider(CacheManager cacheManager) {
this(cacheManager, SecretsManagerClient.create());
this(cacheManager, SecretsManagerClient.builder()
.httpClientBuilder(UrlConnectionHttpClient.builder())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same point

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do

@pankajagrawal16 pankajagrawal16 merged commit 8cdff29 into master Nov 26, 2020
@pankajagrawal16 pankajagrawal16 deleted the performance-improvement-params branch November 26, 2020 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] SSM get parameter taking too long to retrieve a parameter.
3 participants