Open diox opened 2 years ago
This might block https://github.com/mozilla/addons/issues/8725. See also https://github.com/mozilla/addons/issues/8732
Old URL with the app would need to continue to work... we used to redirect in the other way around (no app redirects to with app) so that might cause infinite redirects depending on what got cached.
Given this results in a 301 with a super long Cache-Control: max-age=
value we should probably support both separately and don't try to redirect.
We could start by not consolidating the /android/
and /firefox/
paths into one and focus on tackling the CDN behavior instead. That would likely mean having the 2 patterns separate in the CDN config:
/android/downloads/*
/firefox/downloads/*
Less effective, but that should already improve things a bit.
Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-87
This is still valuable - it would improve our cache hit ratio, therefore consuming less bandwidth - but we should wait until we've switched away from CloudFront.
Our download URLs look like this:
https://{domain}/{app}/downloads/file/{id}/{filename.xpi}
. Which means poor cache hit ratio, because/android/
and/firefox/
are considered different, but also because it's using the default CDN policy, which means their cache key depends on a lot of different things.We should make the URL app-less and add in the CDN config a specific behavior for that pattern, removing
User-Agent
,Accept-Language
,DNT
from the cache key settings.A couple gotchas to consider:
Fenix expects the download URLs to begin with(Removed in https://github.com/mozilla-mobile/firefox-android/commit/8b1690ca904066575c7d18fbc56c7b5c372c76f9)/android/
.┆Issue is synchronized with this Jira Task