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

Share session between requests #31

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

allburov
Copy link
Contributor

Hi! It's fine (and better) to share the session instance between requests.

https://requests.readthedocs.io/en/latest/user/advanced/

So if you’re making several requests to the same host, the underlying TCP connection will be reused, which can result in a significant performance increase (see HTTP persistent connection).

Another benefit - we get access to beams.session and we can configure it as we want to (our case it to add logging for the pusher beams client http requests\responses)

@evgeniibreikin evgeniibreikin self-assigned this Jan 3, 2025
@evgeniibreikin evgeniibreikin added the enhancement New feature or request label Jan 3, 2025
@evgeniibreikin
Copy link
Contributor

Hay, @allburov thanks for the small but significant improvement!

@evgeniibreikin evgeniibreikin merged commit dcd2ad5 into pusher:master Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants