Comments (3)
Or alternatively, I suppose attic can still serve up the narinfos and then redirect the user to a different URL template (rather than the s3 assumed url).
This seems (without looking too much at the code) like it might allow the user to (with disabled chunking) store the nar info via s3 normally, then have a configured publicBlobAccessTemplate
or something better named, that attic then serves the redirects to.
But, doesn't attic need the NAR itself to sign it? I guess I keep coming back to the question of why it signs on download instead of upload. Is it about simplifying the key replacement story?
from attic.
Completely missed this issue 😕 My inbox is actually a disaster...
Yes, this usecase is fully supported. Downloading a NAR with only one chunk always causes a redirect to a presigned S3 URL, regardless of whether chunking is enabled or not. When you disable chunking with nar-size-threshold = 0
, all new NARs will be uploaded as a single chunk.
As for CDN integration, I'm personally putting a Cloudflare Worker in front of my personal instance. You do, however, need to be careful about authentication when caching. Furthermore, Cloudflare has a fairly low upload limit (100MB) unless you pay for Business/Enterprise, but you can sidestep it by setting api-endpoint
and substituter-endpoint
to different values (this is the exact usecase for the separate config).
Edit:
But, doesn't attic need the NAR itself to sign it?
The signature is in .narinfo
and the contents of .nar
s are fully static. Attic only needs to know the content hashes of .nars
in order to generate a signature (more here).
I guess I keep coming back to the question of why it signs on download instead of upload. Is it about simplifying the key replacement story?
Yes, and also to simplify implementation. The caching of computed .narinfo
s can be done via some caching layer like Cloudflare Worker as I mentioned.
from attic.
Thanks, that's a lot of helpful detail. It seems you've designed for a variety of use-cases already. Might I be nosy and inquire for more details?
It seems like chunking would avoid the size limitation, and further necessitates the Worker, so why have you seemingly already considered this use-case (With the api/substituter endpoints)?
I guess the only thing I can think of is... a scenario where the user is not on CF, so doesn't have CF Workers, but still wants to leverage S3-compatible storage via a CDN? I'm not sure why that would be super helpful though, unless they're horizontally scaling attic?
from attic.
Related Issues (20)
- AccessError - weird race condition with auth token checks? HOT 4
- use differential compression
- warning: 'https://cache.domain.com/prod' does not appear to be a binary cache HOT 14
- Big uploads seem to fail. HOT 5
- S3 backend does not re-use connections HOT 1
- Allow building installables in 'attic push'
- make-token --configure not sufficient for configure --public
- Unable to install with the CI install script HOT 2
- Support aarch64-linux container HOT 2
- client disregards configured port in some cases HOT 1
- nixpkgs attic-client and attic-server collide
- [Feature request] Allow setting pub key for cache
- Benchmarking Cachix vs Attic HOT 1
- `ATTIC_SERVER_DATABASE_URL` is ignored when using from flake HOT 2
- pulling artifacts in docker right after build fails
- Delete bad chunks with atticadm
- Very high disk usage after pushing a path
- rvtnfe
- New version for new nix version HOT 1
- [Feature] serve HTML usage instructions on cache pages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from attic.