Pre-compress assets
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 30/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- aws, javascript
- 領域
- cloud, infrastructure
調査の方向性
まず、リポジトリ内で AWS のデプロイとアセットのアップロードに関するエントリポイントを見つけます。この issue では、関連するシステムとして S3、CloudFront、Lambda@Edge、Accept-Encoding ヘッダーが挙げられています。圧縮されたアセットのバリアントをアップロードし、リクエストごとにサポートされているエンコーディングを選択し、説明どおりに CloudFront のキャッシュとオリジン検索を設定できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- JavaScript
- スター
- 12
- フォーク
- 4
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ModusCreateOrg/capsule のほかの issue
-
enhancement
ModusCreateOrg/capsule#74 · 担当者 1 名 ·
-
good first issue MVP2
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
ModusCreateOrg/capsule#73 ·
-
Deb and RPM package オープンenhancement MVP2
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
ModusCreateOrg/capsule#59 ·
-
404 Page. オープンMVP2
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
ModusCreateOrg/capsule#53 · コメント 2 件 ·
-
enhancement MVP2
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
ModusCreateOrg/capsule#52 · コメント 1 件 ·
ModusCreateOrg/capsule の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
bevyengine/bevy-website#2595 ·