Skip to content

[Storage] Cache encryption key if high level api spans across multiple service calls.#22069

Merged
kasobol-msft merged 3 commits intoAzure:mainfrom
kasobol-msft:cache-key
Jun 23, 2021
Merged

[Storage] Cache encryption key if high level api spans across multiple service calls.#22069
kasobol-msft merged 3 commits intoAzure:mainfrom
kasobol-msft:cache-key

Conversation

@kasobol-msft
Copy link
Copy Markdown
Contributor

When user is using client side encryption and uses relatively small buffer to perform download/openread operations then this puts unnecessary pressure on keyvault because we'd call to unwrap encryption key for each chunk.
For example OpenRead for 4GB blob and reading it's content will issue ~1000 unwrap requests as openread uses 4MB buffer by default.

This PR has optimization that caches encryption key for the lifespan of DownloadTo and Stream returned from OpenRead to avoid this.

@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Jun 22, 2021
@kasobol-msft
Copy link
Copy Markdown
Contributor Author

/azp run net - storage - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines failed to run 1 pipeline(s).

@kasobol-msft
Copy link
Copy Markdown
Contributor Author

/azp run net - storage - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@kasobol-msft kasobol-msft merged commit f59a870 into Azure:main Jun 23, 2021
@kasobol-msft kasobol-msft deleted the cache-key branch June 23, 2021 00:17
kasobol-msft added a commit that referenced this pull request Jun 23, 2021
…e service calls. (#22069)

* this test catches the problem.

* cache the content key.

* changelog.
kasobol-msft added a commit that referenced this pull request Jun 23, 2021
* [Storage] Cache encryption key if high level api spans across multiple service calls. (#22069)

* this test catches the problem.

* cache the content key.

* changelog.

* prep release. (#22072)

* Increment version for storage releases (#22081)

Increment package version after release of Azure.Storage.Blobs

Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants