Duplicate selected data when a hot read earns it#
Rendering each feed item by repeatedly joining a post, author, and media record can make a high-volume read path expensive. A feed entry might copy the author display name and thumbnail needed for rendering.
| Benefit | Cost |
|---|---|
| Fewer joins or cross-service calls | Duplicate bytes |
| Simpler, faster reads | More complex writes and backfills |
| Read shape matches product response | Copies can become stale |
Duplication needs an update policy#
Decide whether existing feed entries update when an author changes their name, update asynchronously, or intentionally remain a historical snapshot. Versioning, events, background repair, or recomputation can each be reasonable depending on the product guarantee.
Related practice problems
Use the manifest-backed prompts below to apply this lesson in a complete design.
- Embedded Data in Your MongoDB SchemaMongoDB Documentation