Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
一部のユーザーに開発版スクリプトを配信する - Fastly を使ったカナリアリリース
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Hajime Shiozawa
August 01, 2023
Technology
0
610
一部のユーザーに開発版スクリプトを配信する - Fastly を使ったカナリアリリース
Hajime Shiozawa
August 01, 2023
Tweet
Share
Other Decks in Technology
See All in Technology
ブロックテーマ、WordPress でウェブサイトをつくるということ / 2026.02.07 Gifu WordPress Meetup
torounit
0
210
プロポーザルに込める段取り八分
shoheimitani
1
670
Oracle Cloud Observability and Management Platform - OCI 運用監視サービス概要 -
oracle4engineer
PRO
2
14k
1,000 にも届く AWS Organizations 組織のポリシー運用をちゃんとしたい、という話
kazzpapa3
0
190
GitHub Copilot CLI を使いやすくしよう
tsubakimoto_s
0
110
AIエージェントに必要なのはデータではなく文脈だった/ai-agent-context-graph-mybest
jonnojun
1
250
猫でもわかるKiro CLI(セキュリティ編)
kentapapa
0
130
Cloud Runでコロプラが挑む 生成AI×ゲーム『神魔狩りのツクヨミ』の裏側
colopl
0
150
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
780
生成AIと余白 〜開発スピードが向上した今、何に向き合う?〜
kakehashi
PRO
0
170
pool.ntp.orgに ⾃宅サーバーで 参加してみたら...
tanyorg
0
1.4k
ブロックテーマでサイトをリニューアルした話 / 2026-01-31 Kansai WordPress Meetup
torounit
0
480
Featured
See All Featured
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
740
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
440
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
350
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
920
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
150
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Producing Creativity
orderedlist
PRO
348
40k
My Coaching Mixtape
mlcsv
0
52
Practical Orchestrator
shlominoach
191
11k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
110
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