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

[Client encryption]: Adds support for Brotli compression #4769

Merged
merged 71 commits into from
Oct 11, 2024

Conversation

JanHyka
Copy link
Contributor

@JanHyka JanHyka commented Oct 8, 2024

Pull Request Template

Description

  • Add Brotli compression for .NET8.0 target
  • To stabilize performance tests duration results, GC was reconfigured to server mode (reduces StdDev 42% -> 5%)

Brotli compression is now available for .NET8.0 target. All encrypted fields matching criteria are compressed before encryption.

The option is configurable via Microsoft.Azure.Cosmos.Encryption.Custom.EncryptionOptions property CompressionOptions

CompressionOptions structure:

  • Algorithm : CompressionOptions.CompressionAlgoritm suports None and Brotli (for .NET8.0+), defaults to None.
  • CompressionLevel : System.IO.Compression.CompressionLevel - defaults to CompressionLevel.Fastest
  • MinimalCompressedLength : determines minimal size of encrypted serialized Json text for compression. Defaults to 128 bytes.

It is suggested to benchmark your use cases, different settings can lead to different ratio of compute vs storage costs. Default settings in general should save both cpu time and memory consumption.

Warn: make sure all your instances are upgraded to version supporting compression BEFORE enabling it.

To be processed after #4766

Type of change

Please delete options that are not relevant.

  • [] New feature (non-breaking change which adds functionality)

Closing issues

Contributes to #4678

juraj-blazek and others added 30 commits September 12, 2024 13:41
~ reduce validations overhead
~ update api file
@JanHyka JanHyka requested a review from Pilchie as a code owner October 8, 2024 13:04
@kirankumarkolli
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kirankumarkolli
Copy link
Member

Can you please update the description with usage details (will help consumers)

@kirankumarkolli
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kirankumarkolli kirankumarkolli changed the title [Client encryption]: Add support for Brotli compression [Client encryption]: Adds support for Brotli compression Oct 11, 2024
@kirankumarkolli
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kirankumarkolli kirankumarkolli merged commit 8644014 into Azure:master Oct 11, 2024
24 checks passed
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.

4 participants