Hypothesis
If we move thumbnail caching from the upload cluster to the text cluster, we will increase our resilience against scraping, by ensuring that requests for original files cannot displace thumbnails from the CDN cache.
Context
Requests for image thumbnails account for over 80% of requests to upload.wikimedia.org, which uses a shared CDN cache for thumbnails and original files. High levels of scraping, which predominantly targets originals, can cause the larger original files to displace many smaller thumbnails from cache. This degrades the upload CDN cache, which in turn places strain on inter-DC bandwidth, increases image load times and risks an outage that affects all users. We want to separate the CDN cache for thumbnails and originals, to improve resilience and cache performance for thumbnails. It will also allow us to place stricter limits on requests to originals, which are more likely to come from scrapers.
Scope and constraints
- Serving thumbnails from a URL backed by the text cluster
- Changing MediaWiki to use the new thumbnail URLs
- Gradual roll out of the new thumbnail URLs in MediaWiki
- Migrating hosts between the text and upload clusters
- Helping to migrate tools and gadgets to the new URLs
- Ensuring there is no impact on the mobile apps
- Stricter limits for requests to legacy thumbnail URLs
- Stricter limits for requests to original files
Success measures
- Increased cache hit rate for thumbnail requests
- Reduction in upload cluster incidents due to scraping
- Reduction in network incidents due to scraping originals
- No reduction in performance for browser requests to thumbnails