Skip to content

Conversation

@rajatvig
Copy link
Contributor

What type of PR is this?
Feature

What this PR does / why we need it:
Adds minContentLength field to BackendTrafficPolicy compression configuration. Allows operators to configure the minimum response size for compression, reducing CPU overhead on small responses.

Which issue(s) this PR fixes:
Fixes #7781

Adds support for configuring minimum response size for compression
in BackendTrafficPolicy.

- Added MinContentLength field with validation (min 30 bytes)
- Updated IR and XDS translator
- Added tests

Fixes envoyproxy#7781

Signed-off-by: Rajat Vig <rvig@etsy.com>
@rajatvig rajatvig requested a review from a team as a code owner December 22, 2025 23:48
@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.83%. Comparing base (5da2aac) to head (3e3ca31).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7799      +/-   ##
==========================================
+ Coverage   72.79%   72.83%   +0.03%     
==========================================
  Files         235      235              
  Lines       35176    35189      +13     
==========================================
+ Hits        25606    25629      +23     
+ Misses       7754     7747       -7     
+ Partials     1816     1813       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rajatvig rajatvig force-pushed the feat/compression-min-content-length branch from 5ebaf3e to 446dcb6 Compare December 23, 2025 00:20
Signed-off-by: Rajat Vig <rvig@etsy.com>
@rajatvig rajatvig force-pushed the feat/compression-min-content-length branch from 446dcb6 to abeaa9f Compare December 23, 2025 00:24
@zirain zirain changed the title feat: add minContentLength support for compression (#7781) feat: add minContentLength support for compression Dec 23, 2025
@jukie
Copy link
Contributor

jukie commented Dec 26, 2025

/retest

@jukie
Copy link
Contributor

jukie commented Dec 26, 2025

Could you also update the backendtrafficpolicy testdata with an example inside internal/gatewayapi/testdata/ and internal/xds/translator/testdata/ then run make gen-check?

Signed-off-by: Rajat Vig <rvig@etsy.com>
…n-content-length

Signed-off-by: Rajat Vig <rvig@etsy.com>
Signed-off-by: Rajat Vig <rvig@etsy.com>
Signed-off-by: Rajat Vig <rvig@etsy.com>
Signed-off-by: Rajat Vig <rvig@etsy.com>
…n-content-length

Signed-off-by: Rajat Vig <rvig@etsy.com>
Signed-off-by: Rajat Vig <rvig@etsy.com>
@zirain
Copy link
Member

zirain commented Jan 3, 2026

/retest

@arkodg arkodg added this to the v1.7.0-rc.1 Release milestone Jan 7, 2026
Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks

@arkodg arkodg requested review from a team and jukie January 7, 2026 05:49
Copy link
Contributor

@jukie jukie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

route:
cluster: httproute/default/httproute-1/rule/0
upgradeConfigs:
- upgradeType: websocket
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious why disappear perFilterConfig for compressor?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found it, we should set compression field name in input file of L39.

@rajatvig
All your code looks good, just in case could you update xds testfile ?

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.

Add Support for Configuring Minimum Response Size for Compression

5 participants