Package registry in an SQLite database, snapshotted daily. Stored in a cloud bucket. New clients download the latest snapshot, existing clients stream in the updates using eg Litestream. Resolving dependencies should now be ultra fast thanks to indexes.
I'm just a stupid systems programmer who just discovered Cloudflare. How much do you think that'd cost? Serving a pretty heavily cached SQLite database (i.e. everyone grabs the same bytes). I realize the answer depends on scale, so let's say what if Cargo or Homebrew or some such did this?