Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
一部のユーザーに開発版スクリプトを配信する - Fastly を使ったカナリアリリース
Search
Hajime Shiozawa
August 01, 2023
Technology
790
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
一部のユーザーに開発版スクリプトを配信する - Fastly を使ったカナリアリリース
Hajime Shiozawa
August 01, 2023
Other Decks in Technology
See All in Technology
AIを活用するために決めた "やらないこと" - 価値に注目する / Not betting on AI
soudai
PRO
3
550
技術的負債から考える、AI時代のエンジニアリング投資 — ビズリーチの技術的負債と向き合った経験から、変更し続けられるソフトウェアを考える/ technical-debt-con2026
visional_engineering_and_design
4
3.2k
What the customer really needed
kawaguti
PRO
3
210
顧客に向き合う開発組織へ。リアーキテクチャとフィーチャーチーム化で挑む組織改革
safie
0
2.1k
Claude Codeを「使うほど育つ」AI秘書にするノウハウ
minorun365
PRO
31
27k
AIによるクリエイティブ生成を行う上での試行錯誤
plaidtech
PRO
0
160
おい、エージェントを使って終わらせろ
nwiizo
1
690
事業課題から技術的負債に向き合う
sansantech
PRO
2
2k
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
5
25k
人間はどの意思決定を手放せるのか
kawasima
15
7.3k
アプリをもっと"iOSアプリっぽく"する小さな工夫 / Small Touches That Make Your App Feel More Like an iOS App
matsuji
2
950
AIエージェントの自己改善をどう設計するか / How to Design Self-Improvement for AI Agents
22mi
25
16k
Featured
See All Featured
It's Worth the Effort
3n
188
29k
RailsConf 2023
tenderlove
30
1.5k
So, you think you're a good person
axbom
PRO
2
2.2k
For a Future-Friendly Web
brad_frost
183
10k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Discover your Explorer Soul
emna__ayadi
2
1.3k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
240
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
A Tale of Four Properties
chriscoyier
163
24k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Designing Powerful Visuals for Engaging Learning
tmiket
1
570
Transcript
| © PLAID Inc. 2023.8.1 | 3rdparty.js #1 | 1 ⼀部のユーザーに開発版スクリプトを配信する Fastly を使ったカナリアリリース
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 2 しおざわ はじめ Hajime
Shiozawa Github : @hshiozawa 株式会社プレイドのエンジニア 主にプロダクト基盤の開発をやってます • 解析エンジン Blitz の開発 • 新しい埋め込みタグ Edge の開発
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 3 カナリアリリースをできるようにしよう 新機能を開発したから、新しいスクリプトの検証がしたい! でも、検証環境だとシンプルなテストデータしか⼊ってない いきなり本番環境にはリリースはできない・・・
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 4
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 5
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 6 考えるべきポイント KARTE の埋め込みスクリプトのアーキテクチャ
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 7 1 埋め込みスクリプトの URL は変えない
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 8 2 クライアントごとに配信スクリプトが異なる
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 9 3 クライアントが設定を変えると、スクリプトを再ビルド スクリプトを ビルドするサーバ
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 10 4 スクリプトへの修正は、全スクリプトの再ビルドが必要
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 11 1. 配信スクリプトは同じ URL
2. クライアントごとに違うスクリプト URL 3. クライアントが設定を変えると、スクリプトを再ビルド 4. スクリプトの修正は、全スクリプトの再ビルドが必要 ポイント
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 12 カナリアリリースを実現する
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 13 Fastly VCL を使う 1.
配信スクリプトは同じ URL 2. クライアントごとに違うスクリプト URL を解決する
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 14
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 15 Cookie を付与して Fastly
の VCL で カナリー環境に振り分け Cookie を付与 VCL で振り分け
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 16 sub vcl_recv {
if (req.http.Cookie ~ "new_feature" && req.url ~ "aaa") { # カナリア環境 set req.backend_hint = canary_release_backend; } else { # プロダクション環境 set req.backend_hint = production_backend; } }
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 17 リクエストごとにビルドする 3. クライアントが設定を変えると、スクリプトを再ビルド 4.
スクリプトの修正は、全スクリプトの再ビルドが必要 を解決する
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 18 カナリー環境はリクエストに応じてスクリプトをビルドする 多少⻑めにキャッシュ 毎リクエストビルド
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 19 全体像
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 20
2023.8.1 | 3rdparty.js #1 | | © PLAID Inc. 21 まとめ&感想 埋め込みスクリプトのカナリアリリース 環境の振り分けに
Fastly VCL を使う スクリプトは毎回ビルドしてる CDN にロジックを組めるのは便利 Edge Computing をもっと組み込みたい 💡 💡
None