← Snapchat Interview Insights

Snapchat·Backend Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jun 2026

Summary

Snapchat backend design round, one big question about a file storage system with access control. Pretty deep dive, we spent most of the time on the data model and the authorization query logic. Felt okay but not great coming out of it.

Questions Asked (1)

Q1

Design a file storage system with access control, where users belong to groups, permissions can be assigned to users or groups at the file or folder level, and access inherits down through folder hierarchies.

System DesignData ModelingTechnical Trade-offs
Author's notes

The data model part I felt decent about.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (scale, consistency, latency) and then design a data model that represents files, folders, users, groups, and permissions. Explain how inheritance works and how you would efficiently check access, considering caching and denormalization for performance. Finally, discuss trade-offs between simplicity and scalability.

Pro tip: Mention that you would use a materialized path or closure table for folder hierarchy to enable efficient inheritance checks, and consider caching effective permissions per user-file pair to avoid recursive lookups at scale.

1. Clarify Requirements and Scope

Ask about scale (number of users, files, groups), consistency needs, latency requirements, and whether permissions can be changed frequently. This sets the stage for design decisions.

2. Design Core Data Model

Define entities: User, Group, File, Folder, Permission. Decide on relationships: users belong to groups, permissions can be assigned to users or groups on files/folders. Consider using a unified 'Node' table for files and folders to simplify inheritance.

3. Implement Inheritance and Access Control

Explain how permissions inherit down the folder hierarchy. Discuss approaches: recursive queries, materialized paths, or closure tables. Describe how to compute effective permissions (union of user and group permissions, with deny overrides if needed).

4. Optimize for Performance and Scale

Address how to avoid expensive recursive checks: caching effective permissions, precomputing access control lists (ACLs), or using a permission service with in-memory caches. Discuss consistency trade-offs.

5. Discuss Trade-offs and Extensions

Compare SQL vs NoSQL, normalization vs denormalization, and real-time vs eventual consistency. Mention potential extensions like sharing links, audit logs, or fine-grained permissions.

Key Points to Mention

  • Use of a unified node table for files and folders to simplify hierarchy and inheritance.
  • Efficient hierarchy representation: materialized path, closure table, or nested sets.
  • Effective permission calculation: union of user and group permissions, with deny precedence if applicable.
  • Caching strategies: cache effective permissions per user-node pair, invalidate on permission changes.
  • Scalability considerations: sharding by user or folder, using a distributed cache like Redis.
  • Trade-offs: consistency vs latency, complexity of inheritance vs performance.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.