Product Context
Meta wants to improve a URL shortening product used across Facebook, Instagram, WhatsApp Business, and Ads Manager. Instead of only generating a short link, the system should use ML to decide the best redirect experience and destination variant for each click: for example deep-linking into an app, sending a user to a mobile web fallback, prioritizing a merchant landing page, or routing suspicious traffic to an interstitial.
Scale
| Signal | Value |
|---|
| Monthly links created | 1.2B |
| Active short links | 15B |
| Daily click events | 4.5B |
| Peak redirect QPS | 220K |
| Peak link-creation QPS | 35K |
| Candidate destination variants per click | 20-200 |
| End-to-end redirect latency budget (p99) | 80ms |
Task
Design an end-to-end ML system for ranking redirect outcomes for a short-link platform at Meta scale.
- Clarify the product objective and define the prediction target(s) for link creation time and click time.
- Propose a multi-stage architecture for candidate generation, ranking, and final policy/re-ranking under a strict redirect latency budget.
- Design the offline and online data pipelines, including labels, feature computation, and how you avoid training-serving skew.
- Choose models for each stage and explain tradeoffs in accuracy, freshness, interpretability, and cost.
- Define offline evaluation, online experimentation, and monitoring for drift, abuse, and system health.
- Identify major failure modes and fallback behavior when models, features, or downstream services are unavailable.
Constraints
- Redirects are user-facing and latency-sensitive; p99 must stay below 80ms globally.
- Some clicks have limited identity context because of privacy settings, browser restrictions, or logged-out traffic.
- New links and new advertisers are common, so cold-start handling is required.
- The system must support abuse and spam controls; malicious links cannot be promoted by the ranker.
- Feature freshness matters: engagement and destination health signals should update within minutes, while heavier aggregations can be batch-computed daily.