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
1.1k
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
350
Hack Azure! #5 - Geek of Azure Serverless
shibayan
0
92
.NET Conf 2020 Online - .NET 5 リリース記念パーティートーク
shibayan
0
8.8k
Terraform Provider for Azure に貢献してみた話
shibayan
0
590
Azure Serverless を活用したリアルタイム Web のすべて
shibayan
1
2.8k
祝 東日本リージョン一般提供! Azure Application Insights 基礎と実践
shibayan
1
41k
なかなか楽にならないSSL/TLS証明書の話
shibayan
2
1.7k
.NET Conf 2018 Tokyo
shibayan
1
3.9k
最近の Azure App Service について
shibayan
0
1.3k
Other Decks in Programming
See All in Programming
AI時代に学習する意味はあるのか?
tomoyakamaji
0
110
AHC051解法紹介
eijirou
0
640
時間軸から考えるTerraformを使う理由と留意点
fufuhu
8
2.5k
Zendeskのチケットを Amazon Bedrockで 解析した
ryokosuge
3
230
旅行プランAIエージェント開発の裏側
ippo012
1
580
Trem on Rails - Prompt Engineering com Ruby
elainenaomi
1
100
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
950
Introducing ReActionView: A new ActionView-compatible ERB Engine @ Rails World 2025, Amsterdam
marcoroth
0
200
オープンセミナー2025@広島「君はどこで動かすか?」アンケート結果
satoshi256kbyte
0
230
TDD 実践ミニトーク
contour_gara
1
270
ソフトウェアテスト徹底指南書の紹介
goyoki
1
130
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
210
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Done Done
chrislema
185
16k
Making Projects Easy
brettharned
117
6.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Gamification - CAS2011
davidbonilla
81
5.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
[RailsConf 2023] Rails as a piece of cake
palkan
56
5.8k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
31
2.2k
Music & Morning Musume
bryan
46
6.8k
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