Skip to content

extract archive index cache functionality from AsyncStorage into submodule#3232

Merged
syphar merged 1 commit intorust-lang:mainfrom
syphar:archive-cache-refactor
Mar 8, 2026
Merged

extract archive index cache functionality from AsyncStorage into submodule#3232
syphar merged 1 commit intorust-lang:mainfrom
syphar:archive-cache-refactor

Conversation

@syphar
Copy link
Member

@syphar syphar commented Mar 8, 2026

Our local archive index cache is unbounded right now, due to the fact that we have quite many crawlers, over time, all index files that we have remotely end up being locally cached, for all releases we have on docs.rs. Currently the cache is around ~450 GiB (4 mio files) on our server.

So I'm planning some changes that will help managing the local cache. This will be needed for the new infrastructure where we run multiple webserver ECS tasks, which:

  • likely won't get 500 GiB each for the cache
  • will have to be fine with an empty cache, which will happen after each deploy.

An alternative would be to have a separate EBS filesystem mounted into the web containers, but that will be a network filesystem, so migth be too slow. I would rather have the webserver be resilient enough to handle its caching intelligently.

This PR is about just extracting the existing archive index cache functionality into a separate struct, which we can easier reason about & unit-tests. I also directly added some of these tests. The changes from #3229 are included here, but I kept them separate so we could merge & deploy #3229 while still discussing this PR.

@syphar syphar self-assigned this Mar 8, 2026
@syphar syphar requested a review from a team as a code owner March 8, 2026 09:07
@github-actions github-actions bot added the S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed label Mar 8, 2026
@syphar syphar force-pushed the archive-cache-refactor branch from 02c9d1c to c624f2d Compare March 8, 2026 09:18
@syphar syphar merged commit e7be8de into rust-lang:main Mar 8, 2026
12 checks passed
@syphar syphar deleted the archive-cache-refactor branch March 8, 2026 10:23
@github-actions github-actions bot added S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it and removed S-waiting-on-review Status: This pull request has been implemented and needs to be reviewed labels Mar 8, 2026
@syphar syphar removed the S-waiting-on-deploy This PR is ready to be merged, but is waiting for an admin to have time to deploy it label Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants