This is where the interview got uncomfortable.
Start by clarifying requirements (file sizes, concurrency, consistency needs) and then walk through the upload flow from client to storage, covering chunking, resumable uploads, deduplication, and the separation of metadata and blob storage. Emphasize trade-offs and how you ensure consistency between metadata and blobs, such as using a write-ahead log or two-phase commit.
Pro tip: Proactively discuss failure scenarios and how your design handles them (e.g., partial uploads, metadata-blob inconsistency) to demonstrate production maturity. Also, mention how deduplication interacts with security (e.g., proof of ownership) to show depth.
Ask about expected file sizes, upload frequency, consistency requirements, and whether deduplication should be global or per-user. This sets the stage for design decisions.
Describe chunking strategy (e.g., fixed or variable size), resumable uploads using unique upload IDs and chunk checksums, and client-side retry logic.
Explain how to compute chunk/file hashes, check for existing blobs, and handle race conditions. Discuss trade-offs between chunk-level and file-level dedup.
Propose a metadata store (e.g., SQL/NoSQL) for file info, permissions, and chunk locations, and a blob store (e.g., object storage) for actual data. Highlight scalability and cost benefits.
Describe mechanisms like write-ahead logging, two-phase commit, or eventual consistency with reconciliation to keep metadata and blobs in sync. Cover garbage collection for orphaned blobs.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.
ACL inheritance is one of those things that sounds clean until you try to explain it under pressure.
Start by clarifying requirements and scale, then propose a data model that separates resources, permissions, and inheritance. Explain how you'd compute effective permissions at read time using caching and denormalization, and discuss trade-offs between simplicity, consistency, and performance.
Pro tip: Emphasize that permission checks should be fast and predictable: precompute and cache effective permissions per user-resource pair, and use a bitmask or enum for permission levels to enable quick bitwise checks. Also mention the importance of auditing and revocation for link-based sharing.
Ask about expected number of users, folders, files, and sharing patterns. Clarify permission levels (e.g., read, write, share) and whether inheritance can be overridden.
Propose tables for resources (folders/files), permissions (user/group, resource, permission level), and links (token, resource, permission, expiry). Include parent-child relationships for inheritance.
Explain how permissions propagate down the folder tree, how overrides work, and how to resolve effective permissions for a user on a resource (e.g., walk up the tree or use precomputed paths).
Describe caching strategies (e.g., Redis) for effective permissions, denormalization, and using bitmasks for fast checks. Discuss cache invalidation on permission changes.
Explain how to generate and validate share links with different permission levels, including expiry and revocation. Discuss trade-offs between consistency, latency, and complexity.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.