Practice — SQL vs NoSQL & Data Modeling for Scale (6 questions)
Choosing a Store for a Notifications Service Permalink →
You are designing a notifications service: 200 million users, each user accumulates up to a few thousand notifications (read/unread), the dominant query is "give me this user's latest 50 notifications", writes arrive from many producers (likes, comments, follows) at ~30,000/s peak, and there is no requirement for joins or ad-hoc analytical queries on this data.
- Which storage model best fits this workload, and why?
- Design the partition key and sort key (or equivalent) for the dominant query.
- What is the one requirement that, if added later, would force you to reconsider the choice?
Share this question
Normalising an Order System That Keeps Breaking Reports
Unlock this question →One Rename, 40,000 Writes Permalink →
A document store models "a user's display name" by denormalizing it
directly into every post and comment document that user has ever
made, so reads never need a join — a feed query just reads posts, no
lookup required. User alice_99 has posted and commented 40,000
times over 3 years. She renames herself once.
What does that single rename cost, write-wise, in this design?
Share this question