← Dropbox Interview Insights

Dropbox·Software Engineer·Technical Phone Screen·Senior

SeniorPrefer not to say
Jun 2026Remote

Summary

Dropbox SWE 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 was where things got real.

Questions Asked (2)

Q1

Write a file system crawler that starts from a root directory, walks through all files and subdirectories, and processes each one (e.g. compute size, hash, or extract metadata).

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

Pretty standard recursive traversal.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: what processing is needed, expected scale, and whether concurrency or symlink handling matters. Then outline a recursive traversal using a stack or queue, discuss trade-offs between DFS and BFS, and address edge cases like permission errors and cycles. Finally, mention how you would optimize for large-scale file systems with parallelism and I/O considerations.

Pro tip: Demonstrate awareness of real-world constraints at Dropbox: file systems can be huge, so discuss incremental processing, avoiding loading entire directory trees into memory, and handling errors gracefully without crashing the crawler.

1. Clarify Requirements

Ask about the processing operation (size, hash, metadata), expected scale, whether symlinks should be followed, and if concurrency is needed. This shows you think before coding.

2. Choose Traversal Strategy

Decide between recursive DFS and iterative BFS/DFS. Discuss trade-offs: recursion is simpler but risks stack overflow; iterative uses explicit stack/queue and is safer for deep trees.

3. Handle Edge Cases

Address permission errors, symbolic links (avoid cycles), special files (devices, sockets), and empty directories. Mention using os.walk or equivalent with error handling.

4. Optimize for Scale

For large file systems, consider parallel processing (e.g., thread pool for I/O-bound tasks), streaming results, and avoiding unnecessary stat calls. Discuss memory vs. speed trade-offs.

5. Implement and Test

Write clean, modular code with a callback for processing. Test with a small directory tree, then discuss how you'd test edge cases like permission denied or symlink loops.

Key Points to Mention

  • Recursive vs. iterative traversal and stack overflow risks
  • Handling symbolic links to avoid infinite loops
  • Error handling for permission denied and missing files
  • Concurrency models (threads vs. processes) for I/O-bound tasks
  • Memory efficiency: streaming vs. loading entire tree
  • Using built-in libraries like os.walk or pathlib for robustness

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. You need a database to track discovered nodes and their processing state, an API layer for accepting crawl requests, and an async worker service. The key twist: a worker processing a directory can discover subdirectories and enqueue new async jobs for those. How do you handle exactly-once processing, cycles, retries, and concurrency bounds?

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

This is where I got a bit turned around.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then design the data model and API, and finally address the core challenges of exactly-once processing, cycle handling, retries, and concurrency bounds. Structure your answer around the flow of a crawl request from API to worker, highlighting trade-offs and failure scenarios.

Pro tip: Emphasize idempotency and state transitions: use a unique identifier for each node and a database transaction to atomically update state and enqueue jobs, ensuring exactly-once semantics even with retries. Also, mention that cycle detection can be done via a visited set or by tracking parent-child relationships in the database.

1. Clarify Requirements and Scale

Ask about expected crawl volume, latency requirements, and consistency needs to guide design decisions. Establish assumptions about the number of workers, database choice, and API rate limits.

2. Design Data Model and API

Define a schema for nodes (e.g., URL, state, parent, retry count) and an API for submitting crawl requests and checking status. Consider using a relational database with transactions or a distributed store with conditional writes.

3. Ensure Exactly-Once Processing

Use idempotent operations: assign a unique ID to each node, and when a worker processes a node, update its state to 'processing' in a transaction that also enqueues child jobs. This prevents duplicate processing even if a worker crashes and retries.

4. Handle Cycles and Retries

Detect cycles by checking if a discovered node already exists in the database (e.g., via a unique constraint on URL). For retries, implement exponential backoff and a max retry limit, updating the node's state to 'failed' after exhaustion.

5. Manage Concurrency Bounds

Use a queue with visibility timeout or a database-backed job queue with worker leases to limit concurrent processing. Enforce per-domain or global concurrency limits via a token bucket or semaphore in the worker service.

Key Points to Mention

  • Idempotency via unique node IDs and transactional state updates
  • Cycle detection using a visited set or unique constraint on URL
  • Retry mechanism with exponential backoff and dead-letter queue
  • Concurrency control using worker leases, visibility timeouts, or rate limiting
  • Database choice: relational for ACID transactions vs. NoSQL for scalability
  • API design: RESTful endpoints for submitting crawl requests and checking status

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