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

Clarification required: Best practices around session creation in multithreaded webapp #5

Open
kvelakur opened this issue May 22, 2022 · 1 comment

Comments

@kvelakur
Copy link

For a FastAPI web application that requires a client for each request, what is the recommended way of creating AioSessions? Is it okay to share a single aiobotocore_refreshable_credentials.get_session() between requests? Or it better to create a new one for each request?

@gmr
Copy link
Contributor

gmr commented May 25, 2022

Not sure to be honest. Does the IOLoop persist across requests? If so you should be able to share without issue.

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

No branches or pull requests

2 participants