Predicting preview demand with machine learning
Dropbox's Previews feature lets users view files without downloading them. Behind the scenes, an internal system called Riviera generates preview assets for the hundreds of supported file types, processing tens of petabytes of data daily. For large files, Riviera pre-generates and caches preview assets—a process known as pre-warming—to speed up the experience. But much of that pre-generated content was never actually viewed.
An engineering team saw an opportunity to reduce these compute and storage costs by applying machine learning to predict whether a preview would be used. By only pre-warming files with a high likelihood of being viewed, they could cut infrastructure expense while maintaining a quality user experience. The project, called Cannes, now saves Dropbox approximately $1.7 million per year.
Guiding tradeoffs
Two tradeoffs shaped the design of the optimization. First, the cost-benefit balance: rejecting pre-warm requests saves money, but incorrect rejections force Riviera to generate previews on the fly while the user waits. The team worked with the Previews group to establish guardrail metrics that bound acceptable user experience degradation and used those guardrails to tune how aggressive the model could be.
Second, model complexity versus interpretability and deployment cost. More complex models generally offer better accuracy but are harder to explain and operate. For the first version of Cannes, the team deliberately chose a simpler, interpretable gradient-boosted classifier. That choice made it easier to get serving, metrics, and reporting right, and simplified debugging of any unexpected behavior in Riviera. It also kept deployment cost low for the roughly half a billion requests per day that flow through the system.
The v1 model
The v1 Cannes model was trained on features including file extension, the type of Dropbox account storing the file, and the most recent 30 days of activity in that account. On an offline holdout set, it predicted whether a file's preview would be used within 60 days of pre-warming with greater than 70% accuracy. The model rejected about 40% of pre-warm requests in the holdout, and performance stayed within the guardrail metrics set at the start of the project.
A small number of false negatives—files predicted not to be viewed that were later accessed—were expected and accepted. These incur the cost of generating previews on demand. Subtracting those false negatives from the rejected percentage gave the ballpark annual savings figure of $1.7 million.
The team validated the model with an A/B test on a random 1% of Dropbox traffic using Stormcrow, Dropbox's internal feature gating service. Results matched the offline analysis: accuracy and pre-warm savings were in line, and although the cache hit rate dropped by a couple of percentage points relative to the holdout population, overall preview latency and tail latency (requests above the 90th percentile) were not degraded.
Real-time prediction pipeline
Cannes operates as a prediction pipeline that fetches signals for each file and feeds them into the model to produce a pre-warm decision. The flow:
- Receive file id from Riviera pre-warm path. Riviera collects eligible file ids for preview generation (about 98% of files stored on Dropbox are previewable) and sends each request with the file id and file type.
- Retrieve live signals. An internal service called the Suggest Backend validates the request and queries for activity signals stored in Edgestore (the primary metadata store) or the User Profile Service, a RocksDB data store of aggregated activity signals.
- Encode signals into a feature vector. The Predict Service converts raw signals into a feature vector and sends it to the model.
- Generate a prediction. The model outputs the probability the file preview will be used. Riviera pre-warms files likely to be viewed within 60 days.
- Log information about the request. The Suggest Backend logs feature vectors, prediction results, and request stats for troubleshooting latency and performance issues.
Latency matters here because this pipeline sits on the critical path for Riviera's pre-warming. During rollout to 25% of traffic, the team observed edge cases where availability dropped below internal SLAs, traced to timeouts in the feature encoding step. Optimizations to encoding and the prediction path reduced tail latency for those cases.
Monitoring an ML deployment
Keeping Cannes healthy in production requires monitoring at several levels. The team tracks three categories of metrics:
- Serving infrastructure: Availability of the Suggest Backend and Predict Service, plus data freshness in the User Profile Service, using Grafana dashboards and alerts.
- Preview experience: Comparing preview latency distribution and cache hit rate between the Cannes population and a 3% holdout that runs without Cannes, with extra attention to latency above p90.
- Model performance: Hourly computations of confusion matrix statistics (particularly false negative rates) and area under the ROC curve, stored in Hive and visualized in Superset, which generates alerts on metric changes.
Monitoring alone does not guarantee stability. The team documented upstream dependencies that could impact the model and created runbooks for on-call engineers covering how to isolate issues between Cannes and other system components, plus escalation paths for model-related problems. That close collaboration between ML and infrastructure teams is what keeps the savings flowing without degrading the preview experience.
Production impact and next steps
Cannes now serves nearly all Dropbox traffic. The system replaces an estimated $1.7 million in annual pre-warm costs with roughly $9,000 per year in ML infrastructure spending, driven mainly by added load on Suggest Backend and Predict Service.
With the core Cannes pipeline in production, the team sees several promising directions. More sophisticated model architectures are now viable, and a finer-grained cost function could be built from deeper internal expense and usage telemetry. The Previews team is also exploring whether ML can drive decisions more granular than a binary prewarm or don't-prewarm per file. More creative use of predictive prewarming could unlock further savings without degrading the file preview experience.
The broader ambition is to carry Cannes' tooling and lessons into other Dropbox infrastructure projects. Applying ML to infrastructure optimization is a growing area of focus for the company.
The work was a joint effort between the Previews and ML Platform teams. Contributors included Zena Hira, Jongmin Baek, Jason Briceno, Neeraj Kumar, Kris Concepcion, Anagha Mudigonda, Daniel Wagner, Robert Halas, Ian Baker, Sean Chang, Aditya Jayaraman, and Mike Loh. Dropbox's Intelligence team, which built Cannes, applies machine learning to user, content, and context signals across product and engineering collaborations.



