-
Notifications
You must be signed in to change notification settings - Fork 8.4k
Open
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.needs-priorityneeds-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.
Description
Description:
Currently, NGINX Ingress supports both Brotli and Gzip compression, but there’s no straightforward way to configure Brotli as the preferred encoding when both are enabled.
Since modern browsers and clients widely support Brotli and it generally provides better compression ratios than Gzip, it would be beneficial to allow users to configure NGINX Ingress so that:
- Brotli is prioritized when the client advertises support for both Brotli and Gzip.
- Gzip is only used as a fallback when Brotli is not supported by the client.
Proposed solution:
- Introduce a configuration option that allows explicitly prioritizing Brotli over Gzip in the Content-Encoding negotiation.
- Ensure backward compatibility so that users who prefer Gzip first (or only Gzip) can still configure it that way.
Use case / Motivation:
- Brotli offers significantly smaller responses for text-based resources (HTML, CSS, JS), reducing bandwidth and improving load times.
- Many modern CDNs and reverse proxies already prioritize Brotli when available, so aligning with that behavior would improve consistency.
- Having this option would give operators more control over performance optimizations.
Example config:
data:
enable-brotli: "true"
enable-gzip: "true"
compression-priority: "brotli,gzip"
Metadata
Metadata
Assignees
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.needs-priorityneeds-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.
Type
Projects
Status
No status