Introducing jsDelivr CDN for OpenWrt Downloads Area

With a global user base and terabytes of transfer per month, I saw that the OpenWrt downloads area could really benefit from a content delivery network (CDN).

Therefore, I have gotten in touch with jsDelivr to set up a CDN for the OpenWrt downloads area.

jsDelivr is an awesome initiative that provides CDNs for open-source projects, including CocoaPods, Pyodide, and now OpenWrt. They combine multiple CDN and DNS providers, including Cloudflare, Bunny, and Fastly, to create a CDN that is the fastest of its kind.

Below is the exact setup for the CDN and how to use it, as described by the jsDelivr team.


  1. Stables releases

  2. Snapshots

  3. Archive


To use in opkg, replace downloads.openwrt.org with cdn.jsdelivr.com/openwrt/downloads in /etc/opkg/distfeeds.conf. Example:

src/gz openwrt_core https://cdn.jsdelivr.net/openwrt/downloads/releases/22.03.2/targets/ramips/mt7621/packages
src/gz openwrt_base https://cdn.jsdelivr.net/openwrt/downloads/releases/22.03.2/packages/mipsel_24kc/base
src/gz openwrt_luci https://cdn.jsdelivr.net/openwrt/downloads/releases/22.03.2/packages/mipsel_24kc/luci
src/gz openwrt_packages https://cdn.jsdelivr.net/openwrt/downloads/releases/22.03.2/packages/mipsel_24kc/packages
src/gz openwrt_routing https://cdn.jsdelivr.net/openwrt/downloads/releases/22.03.2/packages/mipsel_24kc/routing
src/gz openwrt_telephony https://cdn.jsdelivr.net/openwrt/downloads/releases/22.03.2/packages/mipsel_24kc/telephony

KeyCDN performance tests:


Note that this a 'proxy' CDN, not a 'bucket' CDN. This means that initial downloads will be from the downloads.openwrt.org origin, and subsequent downloads of the same file will be from the global cache (for the duration of the cache).

In a later stage, the OpenWrt team could consider placing the files directly on the bucket as opposed to proxying from the origin.

Let me know what you think.

2 Likes

Sorry, I meant to post this to the Community Builds, Projects and Packages section.

1 Like

Moved in to the correct section.

You can also replace downloads.openwrt.org with downloads.cdn.openwrt.org to speed up the opkg requests.

2 Likes

Any reason why this isn't advertised at all in https://openwrt.org/infrastructure, or anywhere else in the wiki?

Either way, the jsDelivr CDN has the distinct advantage of being fully supported by a third party with no extra cost to the OpenWrt Project.

As opposed to what costs for downloads.cdn.openwrt.org?

Bandwidth. It's expensive.

Are you assuming that OpenWrt foots the bill for traffic to downloads.cdn.openwrt.org or know that for sure?

It was never formally announced or deployed, presumably as a cost- or maintenance-saving measure. Otherwise, they'd probably be more transparent about it. There are no references to downloads.cdn.openwrt.org anywhere in the wiki and forums, apart from a few logs.

Nevertheless, there are two good solutions at our disposal (one if the cost isn't covered by a third-party). I think utilizing either of them calls for a trivial change.