chore: preemptivly reduce the cost to store the responses by lowering the limit and changing the on disk compression format#6691
Merged
CommanderStorm merged 4 commits intolouislam:masterfrom Jan 13, 2026
Conversation
CommanderStorm
commented
Jan 13, 2026
db/knex_migrations/2025-10-15-0001-add-monitor-response-config.js
Outdated
Show resolved
Hide resolved
CommanderStorm
commented
Jan 13, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR preemptively optimizes storage costs for a new response-saving feature by changing the compression format from gzip to brotli and reducing the default maximum response length from 10KB to 256 bytes.
Changes:
- Reduced default response body length limit from 10240 bytes to 256 bytes
- Changed compression from gzip to brotli for better compression ratios
- Updated both compression (monitor.js) and decompression (heartbeat.js) to use brotli consistently
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/pages/EditMonitor.vue | Updated frontend default for responseMaxLength from 10240 to 256 |
| server/model/monitor.js | Changed response compression from gzip to brotliCompress |
| server/model/heartbeat.js | Changed response decompression from gunzip to brotliDecompress |
| db/knex_migrations/2025-10-15-0001-add-monitor-response-config.js | Set database default for response_max_length to 256 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After thinking about this I came to the conclusion that maybe reducing the default max_lenghth and changing to brotli is likely a good idea before introducing this feature