Skip to content

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
CommanderStorm:make-respnose-storage-less-storage-costly
Jan 13, 2026
Merged

chore: preemptivly reduce the cost to store the responses by lowering the limit and changing the on disk compression format#6691
CommanderStorm merged 4 commits intolouislam:masterfrom
CommanderStorm:make-respnose-storage-less-storage-costly

Conversation

@CommanderStorm
Copy link
Copy Markdown
Collaborator

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

Copilot AI review requested due to automatic review settings January 13, 2026 01:09
@CommanderStorm CommanderStorm changed the title chore: preemtively reduce the cost to store the respnoses by lowering the limit and chaging the on disk compression format chore: preemptivly reduce the cost to store the responses by lowering the limit and changing the on disk compression format Jan 13, 2026
@CommanderStorm CommanderStorm enabled auto-merge (squash) January 13, 2026 01:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

@CommanderStorm CommanderStorm enabled auto-merge (squash) January 13, 2026 01:19
@CommanderStorm CommanderStorm merged commit 59af678 into louislam:master Jan 13, 2026
24 checks passed
@CommanderStorm CommanderStorm added this to the 2.1.0 milestone Jan 14, 2026
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.

2 participants