Skip to content

Conversation

@ramonpetgrave64
Copy link
Contributor

@ramonpetgrave64 ramonpetgrave64 commented Oct 6, 2023

Editing the KMSTokenValidator to allow the boto Config object to customizable.

For a web server use case, such as within lyft/confidant, some good values are

max_pool_connections=100,
connect_timeout=1,
read_timeout=1,

The boto defaults are 10, 60, 60 respectively.

@ramonpetgrave64 ramonpetgrave64 changed the title add max_connection_pool parameter [draft] add max_connection_pool parameter Oct 6, 2023
@ramonpetgrave64 ramonpetgrave64 changed the title [draft] add max_connection_pool parameter add max_connection_pool parameter Oct 19, 2023
@ramonpetgrave64 ramonpetgrave64 changed the title add max_connection_pool parameter add kms performance parameters Oct 19, 2023
endpoint_url=None,
token_cache_size=4096,
stats=None,
max_pool_connections=100,
Copy link
Member

Choose a reason for hiding this comment

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

we should make these defaults to match the boto defaults. Then override as needed.

Copy link

@alejandroroiz alejandroroiz Oct 19, 2023

Choose a reason for hiding this comment

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

https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html

defaults
max_pool_connections = 10
connect_timeout = 60 (seconds)
read_timeout = 60 (seconds)

(whoops just saw you already had this in the description, mb)

read_timeout=1,
):
"""Create a KMSTokenValidator object.

Choose a reason for hiding this comment

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

we should probably also document these new parameters

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

skiptomyliu
skiptomyliu previously approved these changes Oct 19, 2023
@ramonpetgrave64 ramonpetgrave64 merged commit 791c332 into master Oct 20, 2023
@ramonpetgrave64 ramonpetgrave64 deleted the ramonpetgrave64-max-connection-pool branch October 20, 2023 15:36
ramonpetgrave64 added a commit to lyft/confidant that referenced this pull request Oct 20, 2023
Followup to lyft/python-kmsauth#18

Start using the new performance parameters in kmsauth
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.

4 participants