chore: preemptivly reduce the cost to store the responses by lowering the limit and changing the on disk compression format (#6691)

This commit is contained in:
Frank Elsinga
2026-01-13 01:23:06 +00:00
committed by GitHub
parent 751fe1bbf5
commit 59af678eb9
7 changed files with 11 additions and 11 deletions
+3 -3
View File
@@ -60,7 +60,7 @@ const https = require("https");
const http = require("http");
const zlib = require("node:zlib");
const { promisify } = require("node:util");
const gzip = promisify(zlib.gzip);
const brotliCompress = promisify(zlib.brotliCompress);
const DomainExpiry = require("./domain_expiry");
const rootCertificates = rootCertificatesFingerprints();
@@ -1174,8 +1174,8 @@ class Monitor extends BeanModel {
responseData = responseData.substring(0, maxSize) + "... (truncated)";
}
// Offload gzip compression from main event loop to libuv thread pool
bean.response = (await gzip(Buffer.from(responseData, "utf8"))).toString("base64");
// Offload brotli compression from main event loop to libuv thread pool
bean.response = (await brotliCompress(Buffer.from(responseData, "utf8"))).toString("base64");
}
/**