Skip to content

feat!: Compress event payloads by default - #477

Merged
keelerm84 merged 3 commits into
feat/9.xfrom
mk/SDK-3389/compress-events-default
Nov 3, 2026
Merged

keelerm84 merged 3 commits into
feat/9.xfrom
mk/SDK-3389/compress-events-default

Conversation

@keelerm84

@keelerm84 keelerm84 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

The compress_events option now defaults to true. The SDK gzip-compresses
analytics and diagnostic event payloads and sends them with a
Content-Encoding: gzip header. This reduces egress bandwidth for
customers who send events directly to LaunchDarkly.

Relay Proxy versions before 8.9 cannot accept compressed events.
Customers who send events through the Relay Proxy should set
compress_events: false. Older Relay Proxy versions cannot decode the
payloads, and newer versions decode and re-encode them, which adds
overhead.

The stub HTTP server in the specs now decodes a request body based on
its Content-Encoding header instead of a constructor flag.


Note

Overview
Breaking change: compress_events now defaults to true, so analytics event POSTs are gzip-compressed with Content-Encoding: gzip unless callers set compress_events: false.

Docs now call out that Relay Proxy versions before 8.9 cannot accept compressed payloads and should disable compression; newer proxies decode and re-compress, which adds CPU cost.

Specs were updated to assert the new default, document the opt-out on Config, and make the stub HTTP server decode bodies from the request’s Content-Encoding header instead of a test-only enable_compression flag.

Reviewed by Cursor Bugbot for commit 0ddd5e6. Bugbot is set up for automated code reviews on this repo. Configure here.

The compress_events option now defaults to true. The SDK gzip-compresses
analytics and diagnostic event payloads and sends them with a
Content-Encoding: gzip header. This reduces egress bandwidth for
customers who send events directly to LaunchDarkly.

Relay Proxy versions before 8.9 cannot accept compressed events.
Customers who send events through the Relay Proxy should set
compress_events: false. Older Relay Proxy versions cannot decode the
payloads, and newer versions decode and re-encode them, which adds
overhead.

The stub HTTP server in the specs now decodes a request body based on
its Content-Encoding header instead of a constructor flag.
@keelerm84
keelerm84 marked this pull request as ready for review November 2, 2026 17:37
@keelerm84
keelerm84 requested a review from a team as a code owner November 2, 2026 17:37
…ess-events-default

# Conflicts:
#	spec/config_spec.rb
@keelerm84
keelerm84 merged commit a5dc67f into feat/9.x Nov 3, 2026
10 checks passed
@keelerm84
keelerm84 deleted the mk/SDK-3389/compress-events-default branch November 3, 2026 17:15
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