Skip to content

Too aggressive caching for soljson-latest.js in solc-bin #11572

Closed
ethereum/solc-bin
#97
@cameel

Description

@cameel

This came up in juanfranblanco/vscode-solidity#256 (comment).

Some people are getting a stale version of soljson-latest.js from https://binaries.soliditylang.org. It's 0.8.5 rather than 0.8.6.

The file is served from an S3 bucket with a Cloudfront CDN in front of it (the config is described in ethereum/solc-bin#47 (comment)). Binaries are cached because they are supposed to never change but file lists (i.e. any file matching */.list.*) are exempt from caching.

We should probably exempt soljson-latest.js and other files that may change content as well. The problem is that these files do get a lot of traffic. For example bin/soljson-latest.js got over 200k requests in the last month (98.93% out of which came from cache; only 1350 were misses). In total 5 TB of traffic for this file alone, all but 30 GB coming from cache. This is the top downloaded file (though a few others are close). So before doing that we need to check how much it will affect the cost. I think the impact might not be that big, since serving from an S3 bucket should be relatively cheap anyway but it's better to check. If the impact turns out to be too big, we might consider invalidating cache for specific files after every update, in the Github Action responsible for mirroring solc-bin instead of disabling cache for all accesses to the file.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions