Ryan Peterman
Dropbox beat Amazon S3 unit economics by tailoring bare-metal drives to its exact sync workload, but surviving capacity crises required keeping AWS as an emergency overflow valve.
AI-assisted summary of AWS to Dropbox: The Largest Ever Data Migration In History | James Cowling — original source. Check the original for full context.
Source published:
Key ideas
- Dropbox migrated away from Amazon S3 to achieve strategic independence, control its destiny, and capture immense financial savings before its IPO. (0:00)
- By adopting early shingled magnetic recording (SMR) hard drives and bypassing the operating system filesystem, Dropbox achieved better unit economics than AWS S3. (2:01)
- Memory pressure on early Go-based storage nodes triggered Out-of-Memory events that risked cascading congestion collapse, prompting a rewrite in pre-1.0 Rust. (6:01)
- Dropbox engineered 'Trampoline,' an automated safety valve that burst-dumped excess write traffic to Amazon S3 during capacity crunches while keeping user data durability absolute. (12:54)
Detailed notes
## Background Published on YouTube by Ryan Peterman on July 29, 2026, this video features a clip from a wider conversation on Peterman's podcast with James Cowling, former top senior engineer at Dropbox and current CTO at Convex. According to the show description, the discussion focuses on technical details behind Dropbox's landmark infrastructure projects alongside career insights from scaling massive distributed systems.
## TL;DR James Cowling details the engineering and business strategy behind Dropbox's historic migration away from Amazon S3 onto its bespoke storage engine, Magic Pocket. To beat AWS's unit economics prior to going public, Dropbox deeply optimized hardware spend, harnessed shingled magnetic recording (SMR) disks, and bypassed standard operating system layers. Addressing critical operational bottlenecks, the team moved language runtimes from Python and Go to pre-1.0 Rust to prevent memory-induced congestion collapse. Faced with physical bare-metal realities—including ruined delivery trucks that erased weeks of capacity—Dropbox instituted rigorous Failure Mode and Effects Analysis (FMEA) alongside 'Trampoline,' an architectural safety valve routing burst writes back to S3 to guarantee absolute data durability.
## Atmosphere & style The conversation carries an authentic, insider tone characterized by technical depth, pragmatic candor, and shared infrastructure camaraderie. Cowling balances retrospective humor with the gravitas of managing mission-critical bare-metal hardware, openly recalling the stress of 24/7 on-call firefights and sudden capacity crises. Listening in feels like sitting beside a veteran distributed systems architect reflecting without corporate spin on the high-stakes trade-offs of building at world-class scale.
## Bulletin - [00:00](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=0s) Dropbox migrated away from Amazon S3 to achieve strategic independence, control its destiny, and capture immense financial savings before its IPO. - [02:01](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=121s) By adopting early shingled magnetic recording (SMR) hard drives and bypassing the operating system filesystem, Dropbox achieved better unit economics than AWS S3. - [06:01](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=361s) Memory pressure on early Go-based storage nodes triggered Out-of-Memory events that risked cascading congestion collapse, prompting a rewrite in pre-1.0 Rust. - [12:54](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=774s) Dropbox engineered 'Trampoline,' an automated safety valve that burst-dumped excess write traffic to Amazon S3 during capacity crunches while keeping user data durability absolute.
## Key takeaways - [00:00](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=0s) James Cowling discussed replacing S3 with Dropbox founder Drew Houston as early as 2010 before joining the company in 2012. - [00:00](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=0s) Building a custom storage engine acted as a recruitment flywheel, attracting top-tier engineering talent who later redesigned client sync protocols and distributed databases. - [02:01](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=121s) While Amazon offered deeply discounted pricing due to Dropbox's massive scale, S3's general-purpose multi-tenant architecture could not match the bespoke efficiency of Dropbox's internal stack. - [03:27](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=207s) Dropbox separated storage into an access-efficient temporary cluster for fast reads and writes, paired with a massive cold storage cluster that took batch writes outside the synchronous path. - [03:27](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=207s) Hardware teams measured power down to rack circuit breakers, packing maximum drive density within strict amp budgets. - [06:01](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=361s) An initial storage prototype written in Python lacked the memory controls and concurrency performance required for production storage. - [06:01](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=361s) An early Go implementation suffered from unpredictable garbage collection pauses and memory usage on disk-heavy bare metal nodes. - [06:01](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=361s) Storage node OOM restarts were misread by cluster coordinators as dead disk drives, causing a sevenfold data reconstruction amplification that threatened cascading congestion collapse. - [05:58](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=358s) Project DiscoTech utilized low-level drive interfaces like Zone-Based Commands (ZBC) via draft specifications from manufacturers to interact directly with raw disk platters. - [05:58](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=358s) The DiscoTech architecture rebalanced capital expenditures so that the vast majority of hardware spending went toward raw disks rather than RAM, compute, network, or power infrastructure. - [10:16](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=616s) Managing physical on-premises hardware required manual human labor to swap out memory sticks, unlike elastic cloud environments where resources can be provisioned in seconds. - [10:16](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=616s) Two separate delivery trucks carrying racks of server hardware crashed in the same week, wiping out planned capacity expansions for six weeks during a critical period. - [11:44](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=704s) FMEA (Failure Mode and Effects Analysis) pre-mortems were used to map every conceivable failure mode and engineer software-level mitigations against catastrophic risks. - [12:54](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=774s) Dropbox maintained an absolute, non-negotiable standard for user data durability and refused to lower replication factors during high-stress traffic events. - [12:54](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=774s) The Trampoline system routed overflow writes directly to Amazon S3 when internal bare-metal clusters neared maximum capacity, enabling high utilization without risking data loss.
## Detailed walkthrough ### [00:00](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=0s) The Strategic and Cultural Motivations for Leaving S3
Ryan Peterman opens by asking about one of the most prominent projects James Cowling worked on at Dropbox: the large-scale migration away from Amazon S3. Cowling notes that the desire to leave AWS had existed within the company long before he arrived in 2012; he had even discussed it with Dropbox founder Drew Houston around 2010. Strategically, Dropbox wanted to "control the destiny of the company." At that time, before it repositioned itself around broader team collaboration, Dropbox's core market was strictly file sync and share, making full ownership of the underlying storage engine essential to its business model.
Beyond strategy, building an in-house storage engine unlocked massive financial efficiencies prior to Dropbox's IPO. Cowling stresses that taking on an engineering challenge of this magnitude pays cultural dividends across an organization by drawing top-tier talent who thrive on hard problems. Once the storage foundation stabilized, those same senior engineers cycled into other complex layers of the company: teammate Jamie redesigned the desktop client sync protocol, while Cowling moved on to distributed databases and metadata file systems. However, Cowling cautions that such infrastructure comes with heavy ongoing obligations, noting:
> “You know, it's like having a baby and then you have to—you've got to raise the baby. You can't just build a system like this and be that's it, we're done.”
- Cowling spoke with Drew Houston about replacing S3 as early as 2010 and joined Dropbox in 2012. - The project delivered immense cost reductions that proved critical in setting up the company's financial profile before going public. - Complex engineering challenges functioned as a recruitment flywheel, attracting engineers who solved foundational storage and then went on to overhaul client sync protocols and distributed databases.
---
[02:01](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=121s) Outperforming AWS with SMR Disks and Workload Tuning
When Peterman asks whether AWS tried to negotiate and retain Dropbox's business with steep discounts, Cowling admits with a laugh that he is finally free to speak on it. For a long period, Amazon was unaware of Dropbox's plans, but data center industry chatter picked up once Dropbox began purchasing massive amounts of physical floor space. Dropbox was already securing extremely favorable, deeply discounted contract pricing far below retail sticker prices on S3 due to their scale. Despite that, Amazon could not match Dropbox's target unit economics because the bespoke internal infrastructure actually proved more efficient than S3 itself.
Dropbox gained an efficiency advantage because S3 must remain a general-purpose product designed for arbitrary multi-tenant traffic, whereas Dropbox could tailor hardware and software to its exact usage profiles. Dropbox became an early pioneer in deploying shingled magnetic recording (SMR) hard drives at massive scale. Even so, Cowling offers a strong note of caution for modern startups:
> “I wouldn't recommend another company do this right now. Uh but I think at the time it it certainly made sense for us as a company.”
```mermaid flowchart TD accTitle: Generic Cloud Storage vs Tailored In-House Architecture accDescr: Comparison showing S3 serving broad arbitrary workloads versus Dropbox's tailored hardware and software stack.
subgraph AWS ["Amazon S3 General Architecture"] A["Arbitrary Multi-Tenant Workloads"] --> B["Standard Drive Provisioning"] B --> C["Compromised General-Purpose Trade-offs"] end
subgraph DBX ["Dropbox Bespoke Storage Engine"] D["Specific File Sync Workloads"] --> E["SMR High-Density Disks"] E --> F["Hardware & Power Optimized Per Rack"] end ```
---
[03:27](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=207s) Exploiting Access Patterns and Physical Rack Constraints
Cowling breaks down how deep visibility into internal traffic allowed Dropbox to optimize where and how data lived. When users upload files to Dropbox, access patterns are highly predictable: a burst of immediate activity follows the initial write—either from generating image previews or immediate sharing—followed by an exponential decay in access frequency. Dropbox leveraged this decay curve by splitting storage into two tiers: an access-efficient temporary cluster that traded storage density for fast, cheap reads and writes, paired with a massive, colder secondary storage system. The colder cluster took bulk writes in the background using dense, highly efficient layout algorithms; because it lived outside the synchronous write path, an outage on that cluster did not impact user-facing uploads.
These micro-optimizations extended all the way to physical hardware and electrical budgeting. Engineering teams measured power down to the rack's power distribution unit (PDU) circuit breakers, attempting to pack maximum drive density into a specific amp budget. Cowling recalls that during periods where hardware batches experienced higher-than-average drive failure rates, the resulting background re-replication traffic pushed drives so hard that data center operators warned him the racks were running dangerously hot.
- Early file lifecycle: rapid initial read burst for sync and previews, followed by steady cold-tier decay. - Two-tiered storage design: an ingress buffer prioritized for read/write performance feeding an ultra-dense, batch-written cold store off the critical upload path. - Hardware-level management: tuning disk counts directly to the amp limits of top-of-rack PDUs across a multi-exabyte footprint comprising millions of spinning hard drives.
---
[06:01](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=361s) Language Evolution and the Threat of Congestion Collapse
Peterman brings up Dropbox's migration across programming languages, noting the eventual adoption of Rust over memory-related issues. Cowling reveals that the very first prototype was actually written in Python. While Python held up surprisingly well for pure I/O-bound operations, its weak memory controls, concurrency limitations, and refactoring friction disqualified it for production storage where correctness was paramount. Dropbox then rewrote the storage tier in Go well before Go reached 1.0 general availability (GA). Go served well for networking proxies and concurrent server handling, but on disk-heavy bare metal nodes, Go’s runtime and garbage collection introduced unacceptable memory unpredictability.
At massive scale—tracking hardware cost down to individual pie slices for sheet metal and screws—nodes constantly ran on tight memory margins. If a storage node experienced an Out of Memory (OOM) event and restarted, the cluster orchestrator interpreted the missing node as a hard drive failure and initiated data re-replication. Cowling recalls a high-traffic incident where an album release (such as De La Soul) saturated nodes hosting the popular blocks, causing them to OOM under load. Attempting to rebuild the seemingly lost replicas from surviving nodes turned a single incoming traffic spike into a sevenfold data reconstruction avalanche, threatening the system with cascading congestion collapse. To gain exact control over memory and eliminate this failure mode, Dropbox chose Magic Pocket and rebuilt the core storage node layer in pre-1.0 Rust, pairing the rewrite with custom disk-level primitives that bypassed the operating system filesystem altogether. Cowling highlights the fragility of large systems under stress:
> “Congestion collapse is when workload to a system crosses a threshold where it all kind of collapses. So can you design against congestion collapse is really the hardest part or one of the hardest parts of Magic Pocket, which is the name of the storage system.”
- Language progression: started with an initial Python prototype, moved to early pre-GA Go for the initial storage engine, and ultimately migrated node software to pre-GA Rust. - OOM cascading failure loop: heavy user traffic triggered memory spikes on Go nodes $\rightarrow$ nodes restarted $\rightarrow$ the coordinator treated restarts as dead drives $\rightarrow$ Reed-Solomon or replica reconstructions turned one stream of requests into a 7x load amplification across peer nodes. - Direct disk access: the move to Rust coincided with completely discarding traditional Linux filesystems on the data drives to speak directly to raw drive heads.
[09:28](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=568s) Project DiscoTech and Optimizing Hardware Spend
To squeeze maximum efficiency out of their custom storage hardware, the team adopted low-level drive interfaces like ZBC (Zone-Based Commands), which allowed them to bypass standard drive abstractions and communicate directly with the disk platters. Dropbox partnered closely with disk drive manufacturers, who provided draft specifications for cutting-edge drive models before they hit the general market. Operating directly against those draft specs, Dropbox wrote software to control the drives directly. This entire initiative was packaged under the internal project name "DiscoTech," short for the Disk Technology project.
The architectural overhaul solved stability problems by ending cascading congestion collapse and radically improving fleet reliability. Crucially, it completely restructured Dropbox's capital expenditure pie chart. Previously, non-storage overhead consumed huge portions of the budget, but DiscoTech rebalanced the ledger so capital went almost entirely toward raw disk media rather than secondary supporting components. As James Cowling explained the financial objective: “And what we wanted to do is get that pie chart to be almost all the money spent on disks and as little money spent on RAM, on compute, on network, on power, on sheet metal, etc.”
- **ZBC (Zone-Based Commands):** Dropbox relied on early instruction sets and draft specifications supplied directly by disk manufacturers to exert low-level control over drive mechanics. - **Project DiscoTech:** The overarching disk technology initiative that stabilized the fleet and eliminated congestion collapse. - **Hardware cost shift:** The goal was to maximize the share of hardware spend going into storage density (disks) while minimizing expenditures on compute, RAM, networking gear, facility power, and server sheet metal.
---
[10:16](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=616s) The Reality of Physical Hardware and the Two-Truck Crash
When Ryan Peterman asks whether the catastrophic cascading failure prompted a postmortem, Cowling laughs, noting that no formal postmortem was needed because the team felt the failure in real time while being paged around the clock. The episode serves as a quintessential argument in favor of the public cloud. In cloud environments, resizing an instance or allocating RAM takes seconds; with custom on-premises bare metal, hardware constraints are physical and unforgiving. As Cowling reflected: “Imagine you've spent hundreds of millions of dollars on a on a storage system and it's out in production and it's on physical hardware.” If your fleet runs low on RAM, fixing it requires paying technicians to manually unrack chassis and physically swap out memory sticks across thousands of servers.
These physical constraints became starkly evident during one of the most stressful operational episodes on Magic Pocket. In a single week, by bizarre coincidence, two separate delivery trucks transporting full racks of Dropbox server hardware crashed en route. While the drivers were fortunately uninjured, the payload was wrecked, abruptly wiping out anticipated capacity expansions not just for two weeks, but for roughly six weeks. Unlike a personal laptop running out of disk space, this capacity squeeze affected a million production drives. Customers could not be turned away, nor could their files be deleted, forcing the infrastructure team into high-stakes capacity maneuvering to keep the platform alive.
- **On-premises vs. cloud elasticity:** Physical fleets require physical human labor for every hardware upgrade; you cannot click a button to provision RAM across hundreds of millions of dollars of hardware. - **The logistics disaster:** Two separate transit trucks carrying racks of servers crashed in the same week, destroying shipments and causing a six-week deficit in planned server capacity. - **Customer invariants:** Production capacity had to be maintained under all circumstances because dropping customer writes or pruning customer data was entirely out of the question.
---
[11:44](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=704s) FMEA Threat Modeling and the Thrill of the Firefight
Navigating supply chain shocks and capacity crunches forced the team to build comprehensive defensive buffers into their infrastructure planning. Systems had to be architected from first principles to prevent memory spikes and make congestion collapse mathematically impossible. To systematically evaluate catastrophic edge cases, Dropbox instituted a disciplined engineering exercise known as FMEA (Failure Mode and Effects Analysis).
The FMEA process functioned as an exhaustive pre-mortem. Engineers maintained an expansive spreadsheet listing every imaginable failure mode, rating the severity of each scenario from localized hardware faults all the way to catastrophic existential threats, such as a full-scale data center fire that could result in human casualties. Identifying every vulnerability in advance allowed the engineering team to design automated mitigations directly into the platform. While Cowling admits that decades of on-call duty have curbed any fondness for midnight pages, he embraces the sheer technical challenge of bare-metal crises: “I can't say I like getting paged because I've spent my whole life on call, but I do like that rubber hits the road stuff.”
- **FMEA (Failure Mode and Effects Analysis):** Structured pre-mortem threat modeling where teams map every possible failure, assess existential and physical hazards, and design systemic software defenses around them. - **Engineered headroom:** Incorporating strict buffer margins to safeguard the platform against black swan supply chain disruptions and traffic surges. - **The on-call mindset:** Solving novel, high-stakes infrastructure disasters where downstream dependencies run out and no external vendor can step in to rescue you.
---
[12:59](https://www.youtube.com/watch?v=Ar84Ow4l2XE&t=779s) Non-Negotiable Durability and the Trampoline Escape Hatch to S3
Peterman draws a parallel to his time working on infrastructure at Instagram, where teams implemented configurable "DEFCON knobs" to gracefully degrade performance during emergencies—such as temporarily dropping storage replication factors and accepting heightened data-loss risk to keep services upright. Peterman asked: “When I worked on infrastructure at Instagram, we had this concept of DEFCON knobs, which are basically these configs that you could flip that would gracefully degrade your system where you can still operate it, but you know, maybe in the case of Dropbox, you store less replicas.”
Cowling makes it clear that Dropbox took an entirely different stance toward durability: “So, I mean, we just had an just absolute zero non-negotiable like there was no room for negotiation on on users' durability.” While Dropbox did use operational knobs to shed background CPU tasks, throttle memory-heavy jobs, or disable synthetic test traffic during surges, user data safety could never be compromised.
To solve severe capacity shortfalls without degrading durability, Dropbox created a hybrid safety mechanism called "Trampoline." Because Dropbox retained its network connections to AWS, the team configured Magic Pocket to use Amazon S3 as an automated pressure-relief valve. If bare-metal capacity neared a dangerous threshold, Trampoline automatically routed write streams over to S3. This escape hatch allowed Dropbox to run its internal data centers far closer to 100% disk utilization, confident that they could burst-dump 30 petabytes onto S3 during an emergency and seamlessly migrate it back to internal bare-metal drives once new hardware racks arrived.
```mermaid flowchart TD accTitle: Trampoline Storage Architecture accDescr: Diagram illustrating how Magic Pocket routes data locally until capacity thresholds trigger Trampoline to overflow to AWS S3. subgraph Ingest["Client Ingestion"] Writes["Incoming User Writes"] end subgraph LocalDC["Dropbox On-Premises Infrastructure"] MagicPocket["Magic Pocket Engine"] DiscoTech["DiscoTech Disk Fleet"] end subgraph PublicCloud["AWS Cloud Fallback"] S3["Amazon S3 Storage"] end
Writes --> MagicPocket MagicPocket -->|"Normal Operations"| DiscoTech MagicPocket -->|"Capacity Emergency (Trampoline)"| S3 S3 -.->|"Background Drain (When Racks Arrive)"| DiscoTech ```
- **Durability as an absolute invariant:** Dropbox refused to lower replication counts or compromise data durability under any system stress level. - **Operational load shedding:** Non-critical background processes, memory-intensive routines, and synthetic test suites were throttled via knobs during load spikes. - **Project Trampoline:** An automated safety valve that overflowed emergency write volumes (such as 30 PB bursts) to AWS S3 when local disks neared capacity limits. - **Capital efficiency dividend:** Treating S3 as an elastic overflow tank enabled Dropbox to push internal drive utilization significantly closer to maximum thresholds during standard day-to-day operations.
## Mentioned Amazon S3, Amazon Web Services (AWS), Convex, De La Soul, DiscoTech, Drew Houston, Dropbox, Failure Mode and Effects Analysis (FMEA), Go, Instagram, James Cowling, Magic Pocket, Python, Reed-Solomon, Rust, Ryan Peterman, Shingled Magnetic Recording (SMR), Trampoline, Zone-Based Commands (ZBC)
## Video description This is a clip from a longer conversation with James Cowling who is the CTO at Convex and was previously the most senior engineer at Dropbox. We discussed technical details of his past projects and career advice given where AI is today.
Where to watch: • YouTube - https://youtu.be/3XkmNSuHFmY • Spotify - https://open.spotify.com/episode/1Xt2SfdlM8huFQERnsknqP?si=qU-6R9T4QTiwYlpMeppmzg • Apple Podcasts - https://podcasts.apple.com/us/podcast/the-peterman-pod/id1777363835 • Transcript - https://www.developing.dev/p/dropboxs-former-most-senior-eng-building
[Source](https://www.youtube.com/watch?v=Ar84Ow4l2XE)