Skip to content

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