Dropbox
Dropbox logoDropbox · Feature trail

Sync Engine Rewrite and Testing

4 posts · Mar 2020 – Sep 2020

What this trail covers

Dropbox's core sync engine, codenamed Nucleus, has undergone a significant rewrite to improve testability and robustness. This involved redesigning the protocol and data model to eliminate invalid states and simplify state representation. The new concurrency model, primarily single-threaded with offloaded I/O, enables deterministic randomized testing. This post details the architectural changes made to the sync engine to facilitate comprehensive automated testing, including randomized testing for performance regressions. The Apogee framework was developed to measure performance metrics (latency, CPU usage, disk I/O, memory usage, and network I/O) during end-to-end integration tests, aggregating and graphing results to detect performance regressions. Efforts to reduce measurement variability included static sharding of tests, running in Dropbox headless mode, using stage server variants, homogenous VMs with dedicated resources, and RAM disks for storage. This capability evolves to ensure the performance of the sync engine doesn't suffer during rollouts and to validate performance improvements.

All Dropbox trails