Introduce GZIP compression for RSocket#154
Merged
Merged
Conversation
stefanmirkovic
approved these changes
May 8, 2026
This PR introduces GZIP compression on the RSocket protocol. It's only enabled if both the server and the client support it. Payloads that are compressed have a `application/vnd.axoniq.platform.compression.v0` MIME header. Inbound GZIP is also supported. However, the server can only enable it from the first time it received a zipped message. As this is likely to happen quickly, this is fine. The compression ratios differ. Some calls, like the processor report see up to a 88% reduction in the quickstart. Other calls 63%. Some calls don't report any improvement. Only payloads bigger athan 256 bytes are encrypted, as it would grow because of overhead. | Route | Raw | Gzipped | Ratio | Above 256 B? | Wire effect | |----------------------------|--------------:|----------:|-----------:|:------------:|---------------------------------------| | `processor-info-report` | 3 088–3 104 B | 368–370 B | **~11.9%** | yes | Compressed — saves ~88% | | `message-flow-stats` | 2 073 B | 761–765 B | **~36.7%** | yes | Compressed — saves ~63% | | `application-info-report` | 170 B | 162–163 B | ~95% | no | Sent raw | | `entitlement-usage-report` | 55 B | 74 B | **134.5%** | no | Sent raw (gzip would grow it) | | `client-heartbeat` | 1 B | 21 B | 2 100% | no | Sent raw (gzip header alone is 20+ B) |
0ae86f8 to
1625129
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR introduces GZIP compression on the RSocket protocol. It's only enabled if both the server and the client support it. Payloads that are compressed have a
application/vnd.axoniq.platform.compression.v0MIME header.Inbound GZIP is also supported. However, the server can only enable it from the first time it received a zipped message. As this is likely to happen quickly, this is fine.
The compression ratios differ. Some calls, like the processor report see up to a 88% reduction in the quickstart. Other calls 63%. Some calls don't report any improvement. Only payloads bigger athan 256 bytes are encrypted, as it would grow because of overhead.
processor-info-reportmessage-flow-statsapplication-info-reportentitlement-usage-reportclient-heartbeat