Add GZip compression to HAProxy config file#14
Conversation
|
Maybe we should add a minimum file size as described here in their documentation. |
There was a problem hiding this comment.
Pull request overview
This PR adds GZip compression to the HAProxy configuration for the Manager backend to reduce download sizes for web assets. Testing shows the Manager UI bundle size decreased from 6.5MB to approximately 2.7MB. The change adds compression directives to the manager_backend section of the HAProxy configuration.
Changes:
- Adds GZip compression configuration to the
manager_backendin HAProxy - Configures compression for HTML, CSS, JavaScript, JSON, and SVG MIME types
- Sets minimum response size of 1500 bytes for compression eligibility
- Enables compression offload to prevent double compression
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Thanks for the review @dominiquekleeven , good catch there 👍 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
LGTM.
I tested it locally via the demo docker compose profile, everything works as intended. I also checked the network requests and responses, and the compression is properly applied.
Only concern I still have is that its applied to all payload sizes, however #15 can address this.
Description
Fixes #13
As a simple test, I tried out this HAProxy config locally to experiment if the Manager UI would load properly.
I'm not an expert in HAProxy nor any proxy application, so it was just a simple attempt 😉
I looked at the official documentation, and made adjustments based on that.
It seems to correctly apply the GZip compression, and significantly reduce the download sizes.
For example, the Manager UI bundle went down from 6.5MB to about 2.7MB.
Any feedback on this is welcome 👍
Changelog