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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Hajime Shiozawa
August 01, 2023
Technology
830
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
一部のユーザーに開発版スクリプトを配信する - Fastly を使ったカナリアリリース
Hajime Shiozawa
August 01, 2023
Transcript
22 slides
| © 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
Other Decks in Technology
See All in Technology
IBC 2026 動画技術関連レポート / IBC 2026 Report
cyberagentdevelopers
PRO
2
450
属人化したISMS運用をGitHubとAIで仕組み化した1年間の記録
sioncojp
4
2.1k
Frontier Teams — Amazon は AI で「開発のやり方」をどう変えたのか
kmotohas
0
130
Active Directory と Entra ID のむむむな関係
murachiakira
PRO
4
1.8k
仕様と現実の間で落とし所を探るリモートMCPの認証・認可 — Sansanの認証基盤における課題と実践
sansantech
PRO
2
250
SREのためのFinOps入門
muziyoshiz
2
1.3k
分析作業をどこまで任せるか自分で決められる AIネイティブBI『Golden Analytics』が 良さげな話 /golden-analytics-is-ai-native-bi
shinyaa31
0
140
The future of architectural work
ufried
0
200
サボる子はいねぇがー!AgentCoreハーネスの脆弱性に学ぶ、エージェントの入力バリデーション
iwamot
PRO
5
320
Gifu WordPress Meetup #200 に向けて、私たちには何ができるだろうか?/ 2026-11-07 Gifu WordPress Meetup
torounit
0
250
現場を動かすAIエージェント#2_製造業現場でのAI活用から見た、ハマる罠と実践知
kintotechdev
2
210
Kiro IDE 入門 (画面の各部から、頼み方、任せ方、戻し方まで) | 目指せ Kiro マスター 02
inariku
PRO
4
200
Featured
See All Featured
The Curious Case for Waylosing
cassininazir
1
610
Side Projects
sachag
456
43k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.7k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
The agentic SEO stack - context over prompts
schlessera
0
1k
How GitHub (no longer) Works
holman
316
150k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
2
400
Typedesign – Prime Four
hannesfritz
42
3.2k
Between Models and Reality
mayunak
4
570
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Designing for Timeless Needs
cassininazir
1
560
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k