← Dropbox Interview Insights

Dropbox·Software Engineer·Technical Phone Screen·Senior

SeniorPrefer not to say
Apr 2026

Summary

Dropbox software engineering interview with a two-part question that started as a coding problem and then pivoted hard into distributed systems design. The coding part felt manageable but the follow-up is where it got real.

Questions Asked (2)

Q1

Write a file system crawler that starts from a root directory, walks through all files and subdirectories, and does something useful with each one like computing size, hashing, or pulling metadata.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Pretty standard recursive traversal problem.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then outline a recursive or iterative traversal using a stack/queue, handling symbolic links and permissions. Discuss trade-offs between depth-first and breadth-first, synchronous vs asynchronous I/O, and how to process files (e.g., hashing, metadata) efficiently. Finally, mention scalability considerations like parallel processing and error handling.

Pro tip: Demonstrate awareness of real-world file system quirks: hard links, symbolic loops, and permission errors. Also, discuss how to avoid blocking I/O and leverage concurrency for performance, which is crucial for a company like Dropbox that deals with massive scale.

1. Clarify Requirements and Constraints

Ask about the expected scale (number of files, depth), whether to follow symlinks, handle permissions, and what 'useful' means (size, hash, metadata). Confirm if the crawler should be synchronous or asynchronous, and if it needs to be resilient to errors.

2. Choose Traversal Strategy

Decide between recursive DFS (simple, but risk of stack overflow) and iterative BFS/DFS using an explicit stack/queue. Consider memory usage and order of processing. Mention that BFS can be better for parallel processing.

3. Handle File System Edge Cases

Address symbolic links (avoid cycles), hard links (avoid double-processing), permission errors (skip or log), and special files (devices, sockets). Use appropriate system calls (e.g., os.scandir for efficiency).

4. Process Files Efficiently

For each file, perform the required operation (e.g., compute size, hash, extract metadata). Discuss trade-offs: hashing large files in chunks, using async I/O or thread pools for concurrency, and batching metadata reads.

5. Discuss Scalability and Error Handling

Talk about parallelizing traversal and processing (e.g., with worker threads/processes), handling backpressure, and logging errors without failing the entire crawl. Mention potential bottlenecks like disk I/O and how to mitigate them.

Key Points to Mention

  • Use os.scandir or equivalent for efficient directory iteration (avoids extra stat calls).
  • Avoid symlink loops by tracking visited inodes or using a depth limit.
  • Consider asynchronous I/O or thread pools to overlap I/O and CPU work.
  • Handle permission errors gracefully and continue crawling.
  • Discuss trade-offs between DFS and BFS for memory and parallelism.
  • Mention that for hashing, reading files in chunks avoids memory issues.

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

Q2

Now redesign that crawler as a distributed system. Walk through the database layer for tracking state, an API that accepts crawl requests, and an async worker service. Key constraint: a worker processing a directory can discover subdirectories and enqueue new jobs for those. How do you handle exactly-once processing, cycles, retries, and concurrency limits?

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This is where I started sweating a little.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then present a high-level architecture with a database for state, an API for requests, and a worker pool. Dive into the core challenges: exactly-once processing via idempotency and deduplication, cycle prevention with visited sets, retries with backoff and dead-letter queues, and concurrency control with rate limiting and worker quotas.

Pro tip: Emphasize that exactly-once processing is achieved through idempotent operations and deduplication, not by trying to guarantee exactly-once delivery. Also, discuss how to handle failures gracefully with retries and dead-letter queues to avoid infinite loops.

1. Clarify Requirements and Scale

Ask about expected crawl volume, latency requirements, and consistency needs. This informs database choices and concurrency limits.

2. Design the Database Layer

Choose a database (e.g., relational for strong consistency or NoSQL for scale) to track crawl jobs, directories, and visited URLs. Include tables for jobs, workers, and deduplication.

3. Define the API and Worker Service

Design a REST API to accept crawl requests and enqueue jobs. Workers pull jobs, process directories, and enqueue subdirectories as new jobs.

4. Address Core Challenges

Explain exactly-once processing via idempotency and deduplication, cycle prevention with visited sets, retries with exponential backoff and dead-letter queues, and concurrency limits with rate limiting and worker quotas.

5. Discuss Trade-offs and Failure Handling

Highlight trade-offs between consistency and availability, and describe how to handle worker failures, database outages, and poison messages.

Key Points to Mention

  • Idempotency and deduplication for exactly-once processing
  • Cycle detection using visited sets or graph traversal algorithms
  • Retry mechanisms with exponential backoff and dead-letter queues
  • Concurrency control via rate limiting, worker quotas, and backpressure
  • Database schema design for job tracking and state management
  • Trade-offs between consistency, availability, and partition tolerance (CAP theorem)

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