sentry-cli icon indicating copy to clipboard operation
sentry-cli copied to clipboard

Use `zstd` for file uploads

Open szokeasaurusrex opened this issue 11 months ago • 0 comments

zstd compression offers faster compression with better compression ratios compared to gzip, what we currently use for file uploads. Let's consider switching chunk uploads to zstd, from the current gzip.

Some considerations while implementing this change:

  • We need to add support for zstd uploads to both Sentry CLI and Sentry
  • We need to consider backwards compatibility. In the chunk upload options, we likely will not want to specify zstd in the compression field because older versions of Sentry CLI, which don't support zstd, will fallback to uncompressed uploads, rather than falling back to gzip.
    • One potential solution: deprecate the existing compression field, and continue setting it for gzip. Instead, introduce a new compression field which is set to a list of compression algorithms that the server supports. New versions of Sentry CLI , which support zstd and the new compression field, will always pick the first algorithm from the list which the CLI supports. Old versions of Sentry CLI, which neither understand the new field nor support zstd, will ignore the new field, and instead use gzip, as specified in the old field.

szokeasaurusrex avatar Jan 13 '25 16:01 szokeasaurusrex