Menu

1 / 4

How a tiny HTTP response preview ended up buffering a 64 MB download

DEV Community: node·Octri·about 5 hours ago
#TgiN2CSZ
#devtonodejs#devto#dev#response#file
Long article (2200 words) — no AI summary yet.
Reading 0:00
15s threshold

While working on the Monitoring side of Octri, one thing we've had to be extremely careful about is the amount of work we do on the user's end whenever we have to report something. Since we're generating SDKs that other developers integrate in their apps, the user can also enabled the monitoring feature from within the generated SDK to collect performance data from both ends (Client-side and Server-side), so anything we do to collect the telemetry data would probably impact their app's UX in general and use up additional memory, so we had to be extra careful regarding this.

Something particularly interesting for us was, what would happen if we wanted to preview a small portion of the response without interfering with it, this is mostly useful to determine early on in the response's life cycle to locally check why the response failed to parse (if it did), without having to save the entire response in our servers (which is only possible if the user allowed that specific body field) and consume their monthly…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.