Re:Show HN: Static.wiki – read-only Wikipedia using a 43GB S...
by phiresky on Friday July 30, 2021 @07:09PM
(#28013544)
You can chunk the file into e.g. 2MB chunks. The CDN can then cache all or the most commonly used ones. That's what I did in the original blog post to be able to host it on GitHub Pages.
Re:Show HN: Static.wiki – read-only Wikipedia using a 43GB S...
by dmos62 on Saturday July 31, 2021 @06:55AM
(#28017001)
I would look into caching range requests. Simpler than pre-chunking or caching the whole database.
Re:Show HN: Static.wiki – read-only Wikipedia using a 43GB S...
by sltkr on Friday July 30, 2021 @07:14PM
(#28013575)
It should be trivial to split it up into 1GB chunks or whatever. In fact, if you only request single pages, you could split the database up into pagesize-sized files. This is a lot of files, but at least it avoids the need to do range requests at all. You probably want to increase the pagesize a bit though (e.g. maybe 256 KiB instead of the default 4 KiB?)
Re:Show HN: Static.wiki – read-only Wikipedia using a 43GB S...
by floatingatoll on Friday July 30, 2021 @07:58PM
(#28013890)
Range requests are the star, so I would vote keep them? I mean, technically, the CDN could represent each 4kb block of the file as an individual URL, so that you do range requests by filename instead of by .. range request .. but at some point I definitely think RRs are more sane.
Re:Show HN: Static.wiki – read-only Wikipedia using a 43GB S...
by rzzzt on Saturday July 31, 2021 @04:02AM
(#28016299)
Probably both, compute file name and relative offset from the original offset. (A minor complication is requests crossing file boundaries, in which case you have to do two requests instead of one.)
Re:Show HN: Static.wiki – read-only Wikipedia using a 43GB S...
by milankragujevic on Friday July 30, 2021 @07:21PM
(#28013620)
Isn't Cloudflare's limit 512 MB? (except for enterprise plan which has no price defined where it's 5GB)
https://support.cloudflare.com/hc/en-us/articles/200172516-U...
Re:Show HN: Static.wiki – read-only Wikipedia using a 43GB S...
by floatingatoll on Friday July 30, 2021 @07:57PM
(#28013882)
TIL, for whatever it's worth :) Thanks!
Cloudflare's limit is 10GB, 20GB for Cloudfront, 150GB for Akamai and Azure.