Pre-compress assets
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- aws, javascript
- Ambito
- cloud, infrastructure
Direzione di ricerca
Inizia individuando i punti di ingresso del repository per il deployment AWS e l’upload degli asset; l’issue indica S3, CloudFront, Lambda@Edge e l’header Accept-Encoding come sistemi rilevanti. Il lavoro è completato quando vengono caricate varianti compresse degli asset, viene selezionata una codifica supportata per ogni richiesta e vengono configurati il caching di CloudFront e la ricerca dell’origine come descritto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Prior to upload to S3, we can gzip, brotli, and deflate (and potentially other compressions as well) all assets and upload all of the versions (tack on the compression method as an extension, e.g. image.png.br or image.png.gz). Then, in a pre-cloudfront lambda@edge (yes, this means it is run on EVERY request) we read the Accept-Encoding header and then create a CUSTOM x-compression (or w/e) header with a value of the best compression option the user will accept, tell cloudfront to cache based on our custom header value (and pass it along to the origin), and then in a pre-origin lambda@edge, read that value, and then forward the request to the origin after we update the uri to include the compression extension. (edited)
the lambda@edge pre-origin will only get called when assets of that compression type aren’t cached in cloudfront, but the lambda@edge pre-origin will get called every time. It’ll likely add about 10-20ms to the request and cost $0.60 every million requests, but being able to serve brotli will reduce transfer size by ~20%… so given transfer costs and depending on size of assets, it could end up saving money (and almost guaranteed it’ll reduce transfer times for the user) (edited)
(The pre-cloudfront lambda@edge extra effort is b/c cloudfront strips everything except gzip out of the accept-encoding header. Cloudfront only supports gzip natively. Hopefully one day they’ll stop stripping out the other encoding types and then we could potentially drop that extra lambda.)
Pretty much all evergreen browsers (including mobile) support brotli https://caniuse.com/#feat=brotli
- Lingua principale
- JavaScript
- Stelle
- 12
- Fork
- 4
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ModusCreateOrg/capsule
-
enhancement
ModusCreateOrg/capsule#74 · 1 assegnatario ·
-
good first issue MVP2
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
ModusCreateOrg/capsule#73 ·
-
Deb and RPM package Apertaenhancement MVP2
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
ModusCreateOrg/capsule#59 ·
-
404 Page. ApertaMVP2
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
ModusCreateOrg/capsule#53 · 2 commenti ·
-
enhancement MVP2
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
ModusCreateOrg/capsule#52 · 1 commento ·
Tutte le issue di ModusCreateOrg/capsule
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
bevyengine/bevy-website#2595 ·