[JAVA-4969] make zstd compression level configurable Created: 20/May/23 Updated: 31/May/23 Resolved: 31/May/23 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Unknown |
| Reporter: | Ian Springer | Assignee: | Ashni Mehta |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||
| Description |
|
Allow configuring the zstd compression level in the same way it is configured for zlib, i.e.:
Note, this will currently only be used for compression of requests, not responses, because the connection string specification currently does not support a "zstdcompressionlevel" param, though it does support a "zlibcompressionlevel" param (https://www.mongodb.com/docs/manual/reference/connection-string/#mongodb-urioption-urioption.zlibCompressionLevel). I plan to file a separate SERVER issue for adding a "zstdcompressionlevel" param. Nonetheless, a configurable compression level for requests only is still better than nothing, and support for responses can be added once it's implemented by the server. My team's use case for this is as follows. We use the Java driver within a real-time personalization engine that must process events with super low latency. We would like to enable network compression to reduce cross-AZ network costs, but we want to enable it with compression level 1 or 2 to minimize latency. |
| Comments |
| Comment by Ian Springer [ 31/May/23 ] |
|
Thanks, ashni.mehta@mongodb.com |
| Comment by Ashni Mehta [ 31/May/23 ] |
|
Hey Ian, thanks for reaching out! I'll talk to some folks about this (and the linked DRIVERS ticket that you uncovered). Given that this may impact more than just the Java driver, I'm going to close this ticket for now and will share updates on DRIVERS-762 as I have them. |
| Comment by Ian Springer [ 20/May/23 ] |
| Comment by Ian Springer [ 20/May/23 ] |
|
Here's a PR: https://github.com/mongodb/mongo-java-driver/pull/1121 |
| Comment by PM Bot [ 20/May/23 ] |
|
Hi ian.springer@salesforce.com, thank you for reporting this issue! The team will look into it and get back to you soon. |