adoptium / adoptium/infrastructure
Proposal: Shortened URL Redirection for Adoptium Downloads
- Dominant language
- Python
- Stars
- 96
- Forks
- 106
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 13
Description
## Summary
I propose implementing a new, shorter URL format for Adoptium download links using the domain `dl.adoptium.net`. This approach simplifies the download URLs and allows us to dynamically redirect them to the corresponding binaries on GitHub releases.
### New URL Format
The new URL format would be `https://dl.adoptium.net/{major_version}/{openjdk_version}/{file_name}`
For example:
```
https://dl.adoptium.net/17/jdk-17.0.12%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.12_7.tar.gz
```
redirects to:
```
https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.12_7.tar.gz
```
### Implementation
I propose using **Cloudflare Redirect Rules** to handle the dynamic redirection. These rules allow us to capture different versions and file extensions, automatically redirecting users to the appropriate GitHub release page. Once implemented we would need to update the API to return download URLs using this URL shortner rather than the original github.com release link. Changing the API alone should capture nearly all use-cases.
### Benefits
1. **Shorter, more user-friendly URLs**: The `dl.adoptium.net` domain is shorter and easier to share, improving user experience.
2. **Telemetry**: Using our own domain for downloads provides opportunities for gathering better telemetry data, allowing us to track download patterns and volumes more effectively.
3. **Flexibility**: If we decide to move away from GitHub releases in the future, we can easily update the redirection rules without breaking existing download links.
I have left a rule running in Cloudflare so I encourage people to try out the new URL and provide feedback!
Contributor guide
Research direction
Review the existing Cloudflare redirect rule referenced in the issue and the API's current download-URL generation. The work is done when the proposed dl.adoptium.net format redirects to the matching GitHub release binary and the API returns the shortened URLs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github
- Domain
- api, cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100