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

All HTTP calls through a session #55

Merged
merged 1 commit into from
Jan 3, 2018

Conversation

martindurant
Copy link
Member

One requests.Session per GCSFileSystem instance. Should cut down on SSL handshaking.

One requests.Session per GCSFileSystem instance. Should cut down on SSL handshaking.
@martindurant
Copy link
Member Author

Fixes #50

@martindurant
Copy link
Member Author

Q: would it be better to have a single global Session for everything? In typical dask usage, I think we may be creating new GCSFileSystem instances, which would have new sessions and not benefit from sharing.

@mrocklin
Copy link
Contributor

mrocklin commented Jan 3, 2018

If the different GCSFileSystem objects had different permission would they want different Sessions?

Alternatively, perhaps we should have a singleton GCSFileSystem.current()?

@martindurant
Copy link
Member Author

No, we can still maintain a different header token - which fixes the user identity - for each file-system instance rather than have it set for the global session. The SSL connection should still be sharable between them, the interchange of certificates does not depend on the user token.

@mrocklin
Copy link
Contributor

mrocklin commented Jan 3, 2018

I'm inclined to merge this for now and then, once we hit performance issues with many file systems resolve that later, perhaps by caching file system objects.

@martindurant
Copy link
Member Author

Agreed.

@martindurant martindurant merged commit 562719b into fsspec:master Jan 3, 2018
@martindurant martindurant deleted the sessions branch January 3, 2018 19:39
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.

2 participants