You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Rationale for this change
The existing S3 remote signing hook function (`s3v4_rest_signer`) uses
`requests.post` to submit `POST` requests to the REST signing endpoint.
This internally creates a new `requests.Session` for every request,
preventing any reuse of connections.
In my profiling I saw this add overhead from repeated loading of CA
certs and reestablishing of TLS connections.
This change makes the signing function a callable object that wraps a
`request.Session`, using this for `POST`ing, therefore achieving
connection reuse.
Signer callables are stored on the hook internals of the `aiobotocore`
client inside the `s3fs.S3FileSystem` instance, so use and lifetime will
match that of those instances. They are thread-local since:
#2495.
## Are these changes tested?
Tested locally. Existing unit tests updated for changes.
## Are there any user-facing changes?
Yes - S3 signing requests now use connection pools (scoped to the
`s3fs.S3FileSystem` object).
0 commit comments