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
Tatsuro Shibamura
November 12, 2019
Programming
0
1k
Azure Functions と SendGrid の良い関係
Tatsuro Shibamura
November 12, 2019
Tweet
Share
More Decks by Tatsuro Shibamura
See All by Tatsuro Shibamura
Hack Azure! #5 - Geek of Azure Serverless
shibayan
0
81
.NET Conf 2020 Online - .NET 5 リリース記念パーティートーク
shibayan
0
8.4k
Terraform Provider for Azure に貢献してみた話
shibayan
0
540
Azure Serverless を活用したリアルタイム Web のすべて
shibayan
1
2.7k
祝 東日本リージョン一般提供! Azure Application Insights 基礎と実践
shibayan
1
40k
なかなか楽にならないSSL/TLS証明書の話
shibayan
2
1.6k
.NET Conf 2018 Tokyo
shibayan
1
3.9k
最近の Azure App Service について
shibayan
0
1.2k
一休.com がどのように SendGrid と仲良く付き合っているか
shibayan
0
5.1k
Other Decks in Programming
See All in Programming
Djangoにおける複数ユーザー種別認証の設計アプローチ@DjangoCongress JP 2025
delhi09
PRO
4
500
CloudNativePGを布教したい
nnaka2992
0
120
コミュニティ駆動 AWS CDK ライブラリ「Open Constructs Library」 / community-cdk-library
gotok365
2
250
color-scheme: light dark; を完全に理解する
uhyo
7
500
Boos Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
540
Expoによるアプリ開発の現在地とReact Server Componentsが切り開く未来
yukukotani
1
180
ML.NETで始める機械学習
ymd65536
0
240
Rubyと自由とAIと
yotii23
6
1.9k
ソフトウェアエンジニアの成長
masuda220
PRO
12
2.1k
PHPカンファレンス名古屋2025 タスク分解の試行錯誤〜レビュー負荷を下げるために〜
soichi
1
740
Kotlinの開発でも AIをいい感じに使いたい / Making the Most of AI in Kotlin Development
kohii00
5
1.7k
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.6k
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
We Have a Design System, Now What?
morganepeng
51
7.4k
The Invisible Side of Design
smashingmag
299
50k
Automating Front-end Workflow
addyosmani
1369
200k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
Java REST API Framework Comparison - PWX 2021
mraible
29
8.4k
The Cult of Friendly URLs
andyhume
78
6.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
How to train your dragon (web standard)
notwaldorf
91
5.9k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
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