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
Azure Functions と SendGrid の良い関係
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Tatsuro Shibamura
November 12, 2019
Programming
0
1.3k
Azure Functions と SendGrid の良い関係
Tatsuro Shibamura
November 12, 2019
Tweet
Share
More Decks by Tatsuro Shibamura
See All by Tatsuro Shibamura
# Azure Cosmos DB パフォーマンス最適化入門 - 設計・開発・運用の実践テクニック
shibayan
0
500
Hack Azure! #5 - Geek of Azure Serverless
shibayan
0
110
.NET Conf 2020 Online - .NET 5 リリース記念パーティートーク
shibayan
0
9.6k
Terraform Provider for Azure に貢献してみた話
shibayan
0
630
Azure Serverless を活用したリアルタイム Web のすべて
shibayan
1
3k
祝 東日本リージョン一般提供! Azure Application Insights 基礎と実践
shibayan
1
42k
なかなか楽にならないSSL/TLS証明書の話
shibayan
2
1.9k
.NET Conf 2018 Tokyo
shibayan
1
4.1k
最近の Azure App Service について
shibayan
0
1.3k
Other Decks in Programming
See All in Programming
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
1.8k
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
180
実践ハーネスエンジニアリング #MOSHTech
kajitack
7
4.6k
我々はなぜ「層」を分けるのか〜「関心の分離」と「抽象化」で手に入れる変更に強いシンプルな設計〜 #phperkaigi / PHPerKaigi 2026
shogogg
2
640
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
850
仕様漏れ実装漏れをなくすトレーサビリティAI基盤のご紹介
orgachem
PRO
7
3.2k
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
340
Claude Codeログ基盤の構築
giginet
PRO
7
3.7k
Java 21/25 Virtual Threads 소개
debop
0
290
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.2k
Codexに役割を持たせる 他のAIエージェントと組み合わせる実務Tips
o8n
4
1.4k
テレメトリーシグナルが導くパフォーマンス最適化 / Performance Optimization Driven by Telemetry Signals
seike460
PRO
2
180
Featured
See All Featured
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
Paper Plane
katiecoart
PRO
0
48k
It's Worth the Effort
3n
188
29k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
GitHub's CSS Performance
jonrohan
1032
470k
Testing 201, or: Great Expectations
jmmastey
46
8.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Scaling GitHub
holman
464
140k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
330
The Curious Case for Waylosing
cassininazir
0
280
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
250
RailsConf 2023
tenderlove
30
1.4k
Transcript
Azure Functions と SendGrid の良い関係 SendGrid Night #8 @shibayan
自己紹介 Tatsuro Shibamura @shibayan https://shibayan.jp/ Azure / Serverless 好き
メール送信に必要なもの • 大量送信・スパイクにも対応できる柔軟なスケーリング • 障害発生時にもメールが失われない仕組み • 復旧後にはリトライが行われる・行える仕組み • 送信したメールのトラッキング •
送信完了、バウンス、スパム、メール開封など
バックエンドに Azure Functions を • SendGrid に公式で対応済み • Microsoft.Azure.WebJobs.Extensions.SendGrid パッケージ
• 柔軟なスケーリングオプション、イベントドリブンに最適 • 使った分だけ課金、インスタンスは自動で 200 まで増える • 従量課金プラン (Consumption Plan) の場合 • Queue を使った Load leveling や Event Webhook への対応
SendGrid バインドを使う • テンプレートが用意されているので簡単 Azure 以外では SendGrid のみ標準サポート
メール送信の Function • Function の実装も非常にシンプル SendGridMessage を 組み立てて返すだけ Queue からメッセージを受け取る
モニタリングも標準装備 • 2000 メッセージを Queue に追加した時のグラフ例 Outgoing Request が Mail
Send API の実行回数
Mail Send API の状態も一目で • API のエラーレートが高くなった、など確認できる API 単位での統計を確認できる
Event Webhook を受ける • HttpTrigger を使って簡単に受け取れる • Azure FunctionsでEvent Webhookデータを受信する
• https://sendgrid.kke.co.jp/blog/?p=9403
ワークフローの実装 • Azure Logic App の SendGrid Connector • 送信だけではなく、Global
Suppressions も使える(らしい • 複雑なフローは Durable Functions で実現 • Azure Functions の 超イケてる Durable Functions を使ってみる • https://qiita.com/TsuyoshiUshio@github/items/3e8acb1b0388b604 5fdb