Design a post privacy/visibility system
MetaSoftware Engineer · OnsiteLast updated
This question evaluates a candidate's ability to design access control and visibility mechanisms for social posts, covering privacy models, efficient read-time enforcement, data modeling, caching strategies, and handling dynamic friendship and privacy updates.
Design a privacy system for social media posts (similar to Facebook post privacy).
Requirements:
- Each post can be: Public, Friends, Friends-of-friends (optional), Only me, or Custom (allowlist/denylist/groups).
- Enforce privacy on reads (feed and direct post URL).
- Work efficiently with caching and high read QPS.
- Support updates to friendships and privacy settings.
Out of scope: complex regulatory auditing.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.