Skip to content

Conversation

@risicle
Copy link
Member

@risicle risicle commented Mar 2, 2025

Depends on alphagov/notifications-python-client#255

We're currently dividing the effectiveness of any connection-pooling we're doing to api-web by >20x by having a separate connection pool per sub-api-client. This contributes to the excessive number of GreenThreads api-web needs to keep active when it has keepalive enabled.

Instead keep a single (lazily-constructed) requests.Session per-thread which gets injected into each sub-api-client at lazy-construction-time.

risicle added 2 commits March 2, 2025 13:49
this allows us to share the same connection pool between
the >20 api client instances we have, providing better
utilization
Copy link
Contributor

@CrystalPea CrystalPea left a comment

Choose a reason for hiding this comment

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

Looks good in general, just not sure about the temp dependency bump.

EDIT: just saw this is a draft PR, so I guess this will be fixed before it's ready to merge?

pyexcel-xlsx==0.6.0
pyexcel-ods3==0.6.1
notifications-python-client==10.0.0
notifications-python-client @ git+https://github.com/alphagov/notifications-python-client.git@5eafd129144f5006e2d7bf501a9c38450979d4b6
Copy link
Contributor

Choose a reason for hiding this comment

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

so I can see this is a TEMP bump - what plan do we have to ensure this temp doesn't become a semi-permanent thing that will throw someone later?

Also is there a PR for these python client changes that needs reviewing?

Copy link
Member Author

Choose a reason for hiding this comment

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

☝️ linked in the PR description

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.

3 participants