Design a Nested Comments System
0%
Editorial Solution
System requirements
Functional
Capacity estimation
Traffic
API design
Create Comment
Database design
PostgreSQL with Materialized Path
High-level design
Request flows
Post Reply Flow
Detailed component design
Comment Tree Retrieval with Materialized Path
Tradeoffs
Adjacency List vs. Materialized Path vs. Closure Table
Failure scenarios
Comment Deleted but Replies Exist
Future improvements
Content Moderation and Spam Filtering
Table of Contents
Premium content
UnlockPremium content
UnlockPremium content
UnlockPremium content
UnlockPremium content
UnlockPremium content
UnlockPremium content
UnlockPremium content
UnlockPremium content
UnlockPremium content
UnlockTry this problem yourself
Reading a solution is not the same as producing one under interview pressure. Design it on the whiteboard and get scored feedback.
0%
Editorial Solution
System requirements
Functional
Capacity estimation
Traffic
API design
Create Comment
Database design
PostgreSQL with Materialized Path
High-level design
Request flows
Post Reply Flow
Detailed component design
Comment Tree Retrieval with Materialized Path
Tradeoffs
Adjacency List vs. Materialized Path vs. Closure Table
Failure scenarios
Comment Deleted but Replies Exist
Future improvements
Content Moderation and Spam Filtering