Amazon DocumentDB now supports document compression using the LZ4 compression algorithm with compressed documents up to seven times smaller.
Document compression can reduce storage usage and I/O cost leading to lower storage and I/O costs.
You can use the Amazon DocumentDB Compression Review Tool to get a sense of how compressible your data is, before enabling compression.
Using existing APIs, you can monitor compression status and collection size after compression.
Compressed documents require less storage space and fewer I/O operations during database reads and writes, leading to lower storage and I/O costs.
Document compression/decompression requires additional CPU as well as increases read/write latency – but the benefits will outweigh the overhead if you have collections with compressible data.
You can configure document compression for individual Amazon DocumentDB collections based on collection access patterns and storage requirements.
Document compression is only supported on Amazon DocumentDB version 5.0 and only collection data is compressed in Amazon DocumentDB.
You can always enable compression on a collection as your workload changes in future.
Amazon DocumentDB Compression can be a great way to reduce costs and improve performance for your DocumentDB workloads with compressible data.