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.2k
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
370
Hack Azure! #5 - Geek of Azure Serverless
shibayan
0
93
.NET Conf 2020 Online - .NET 5 リリース記念パーティートーク
shibayan
0
9k
Terraform Provider for Azure に貢献してみた話
shibayan
0
600
Azure Serverless を活用したリアルタイム Web のすべて
shibayan
1
2.9k
祝 東日本リージョン一般提供! Azure Application Insights 基礎と実践
shibayan
1
41k
なかなか楽にならないSSL/TLS証明書の話
shibayan
2
1.8k
.NET Conf 2018 Tokyo
shibayan
1
4k
最近の Azure App Service について
shibayan
0
1.3k
Other Decks in Programming
See All in Programming
When Dependencies Fail: Building Antifragile Applications in a Fragile World
selcukusta
0
110
Devoxx BE - Local Development in the AI Era
kdubois
0
150
Server Side Kotlin Meetup vol.16: 内部動作を理解して ハイパフォーマンスなサーバサイド Kotlin アプリケーションを書こう
ternbusty
3
260
ドメイン駆動設計のエッセンス
masuda220
PRO
14
5.7k
社会人になっても趣味開発を続けたい! / traPavilion
mazrean
1
110
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
12
7.2k
技術的負債の正体を知って向き合う
irof
0
270
TFLintカスタムプラグインで始める Terraformコード品質管理
bells17
2
470
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
380
マンガアプリViewerの大画面対応を考える
kk__777
0
390
他言語経験者が Golangci-lint を最初のコーディングメンターにした話 / How Golangci-lint Became My First Coding Mentor: A Story from a Polyglot Programmer
uma31
0
450
contribution to astral-sh/uv
shunsock
0
550
Featured
See All Featured
How GitHub (no longer) Works
holman
315
140k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
2
140
It's Worth the Effort
3n
187
28k
The Illustrated Children's Guide to Kubernetes
chrisshort
49
51k
The Pragmatic Product Professional
lauravandoore
36
7k
How to train your dragon (web standard)
notwaldorf
97
6.3k
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