Any best practice documentation for saving storage space by compression and modifying json document keys in mongoDB

We currently receive 7 billion documents for a month and we haven’t compressed the keys in json document we can come up with shortened key for document. Before doing that we wanted to see if there is a list of best practices to follow in this scenario.

Keep in mind that wiredtiger is performing block compression for collections and prefix compression for indexes, so the end result may not be as bad as you think.

Mongo 4.2 introduces zstd compression which is better in terms of compression and cpu usage.

Have a read over https://docs.mongodb.com/manual/core/data-model-operations/index.html#storage-optimization-for-small-documents.

2 Likes