Q70 [Scenario]: Most users have 100 posts, but 0.01% of viral celebrity users have 10,000,000 posts. How do you design a schema that handles both efficiently without over-engineering?
Apply the Outlier Pattern. Design the schema for the 99.99% standard use case (e.g., embedding recent posts or standard document structures). Add an hasExtraData: true flag for outlier entities, routing their excess data overflow into a separate secondary overflow collection.
Key Takeaways
Optimize schema for standard typical use cases.
Use the Outlier Pattern to handle rare extreme edge cases gracefully.
Knowledge Check
Which design pattern prevents rare extreme edge-case entities from dictating an inefficient schema structure for standard users?