Json format too bloated

Hi @karto_sack

Welcome to MongoDB community!

Shorten document keys is a known way to compress document size.

However, there several additional ways:

  1. If you have small documents who are accessed together and have similar values for all you may consider using a bucket pattern to store the change values in an array. This is as long as your arrays keep reasonable number of elements.
    Building with Patterns: The Bucket Pattern | MongoDB Blog
  2. You can change the default compression of the storage layer to allow better compression over some additional cpu overhead:
    https://docs.mongodb.com/manual/core/wiredtiger/#compression
  3. You can always consider sharding and spreading data cross different replica sets allowing u to scale the collection.

Best
Pavel

3 Likes