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 Serverless 2019 Summer edition
Search
miyake
July 30, 2019
Technology
2
390
Azure Serverless 2019 Summer edition
Serverless Meetup Tokyo #13 で発表させていただいたスライドです。
miyake
July 30, 2019
Tweet
Share
More Decks by miyake
See All by miyake
Mirroring Azure Cosmos DB in Microsoft Fabric
miyake
1
38
LLM 時代におさえておきたい Azure Serverless ファミリーまとめ / serverlessdaystokyo2023-llm-aoai
miyake
8
2.1k
Nuxt Studio を使ってみた / nuxt-studio-intro
miyake
0
300
Microsoft Build 2023 で発表された Cosmos DB の注目アップデート / Microsoft Build 2023 Cosmos DB update
miyake
1
620
祝 🎉 両方とも正式リリース! GitHub Codespaces と Nuxt3 で次世代開発体験 / codespaces-nuxt3
miyake
0
1.2k
Static Site Generator でサイト構築 / building sites with static site generator
miyake
1
230
Design and implementation of Cosmos DB Change Feed-centric architecture
miyake
0
770
Well-Architected Framework を活用した Azure 設計パターン / azure-well-architected-framework
miyake
2
1.2k
2020 年下半期 Cosmos DB の更新まとめ
miyake
0
550
Other Decks in Technology
See All in Technology
MapLibreとAmazon Location Service
dayjournal
1
130
Oracle Cloud Infrastructure:2024年4月度サービス・アップデート
oracle4engineer
PRO
1
170
エンジニアのキャリアをちょっと楽しくする3本の軸/Three Pillars to Make an Engineer's Career More Enjoyable
kwappa
0
2.5k
Java EE/Jakarta EEの現状と将来―クラウドネイティブ時代にJava EEは対応できるのか?―
takakiyo
1
120
SREとその組織類型
tatsuo48
9
1.6k
自動生成を活用した、運用保守コストを抑える Error/Alert/Runbook の一元集約管理 / Centralized management of Error/Alert/Runbook to minimize operational costs using automated code generation
biwashi
12
2.3k
推しは推せるときに推せ! プロダクトにフィードバックしていこう
nakasho
0
220
SIEMを用いて、セキュリティログ分析の可視化と分析を実現し、PDCAサイクルを回してみた
coconala_engineer
0
270
ServiceNow Knowledge 24の歩き方 EYストラテジー・アンド・コンサルティング
manarobot
0
170
ChatGPT for IT Service Management (IT Pro)
dahatake
7
1.4k
プロデザ! BY リクルート vol.18_リクルートのリサーチ実践組織「リサーチブーストコミュニティ」
recruitengineers
PRO
3
260
ChatworkのSRE部って実は 半分くらいPlatform Engineering部かもしれない
saramune
0
150
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
259
12k
Scaling GitHub
holman
457
140k
Rails Girls Zürich Keynote
gr2m
91
13k
Music & Morning Musume
bryan
41
5.6k
Building a Modern Day E-commerce SEO Strategy
aleyda
16
6.4k
Writing Fast Ruby
sferik
620
60k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
119
39k
A designer walks into a library…
pauljervisheath
199
23k
StorybookのUI Testing Handbookを読んだ
zakiyama
12
4.6k
The Illustrated Children's Guide to Kubernetes
chrisshort
30
46k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
186
16k
How to train your dragon (web standard)
notwaldorf
72
5.1k
Transcript
Azure Serverless 2019 Summer edition Serverless Meetup Tokyo #13 1
About Me 三宅 和之 @kazuyukimiyake 株式会社ゼンアーキテクツ CTO Microsoft MVP (
for Microsoft Azure ) Azure/azure-functions-durable-extension Contributer Vue.js-jp, typescript-jp コアスタッフ PaaS がかりの部屋(Blog): https://k-miyake.github.io/blog/ 2
Serverless Community(JP) と私 いつも⼤変お世話になっております。感謝しかありません︕ 3
Serverless の定義 (※ このセッションでの定義) Serverless = BaaS ( Backend as
a Service) + FaaS ( Functions as a Service) martinfowler.com 記事 4
Azure Serverless ファミリー Azure Functions だけが Serverless ではない 5
Azure Serverless アーキテクチャ例#1 IoT データやクリックストリームのデータ処理フローを Serverless で構築 動画(くらでべ - de:code
2019 DP81): https://youtu.be/qBmNi3ZrsUk 6
Azure Serverless アーキテクチャ例#2 グローバルにスケールするアプリケーションを Serverless で構築 MS 本社の Matias Quaranta
が Azure Friday でデモを実施したアーキテクチャ 動画( Azure Friday )https://youtu.be/cfZUiVQIhTw 7
今⽇紹介するキーテクノロジー 1. Azure Functions 2. Azure Cosmos DB 3. Azure
SignalR Service 4. Azure SQL Database Serverless 8
キーテクノロジー: Azure Functions バインディングによりコード量が⼤幅に減る C# だけではない( Node.js オススメ︕ ) OSS
として開発されている- https://github.com/Azure/Azure-Functions V2 に進化した 9
トリガーとバインディング トリガー: イベントに応じて Function を発⽕ バインディング: I/O に関するコードを隠蔽し、コードをシンプルに保てる 10
Azure Functions は V2 へ進化(更新を推奨) Runtime を Host process と
Worker process に分離 新機能はほとんどが V2 のみをサポート (V1 はほぼメンテナンスされていない) 11
Premium Plan 登場 コールドスタート回避機能あり ⾼度なスケーリング設定が可能 インスタンスサイズ 最⼩/最⼤(200 まで) (※ プレビュー)
12
TypeScript サポート Node.js ベースでの Azure Functions 開発が安全・快適に︕ import { AzureFunction,
Context, HttpRequest } from "@azure/functions"; // API のペイロード定義 type Member = { name: string; isMember: boolean; }; // Function (HTTP トリガー) の実装 const httpTrigger: AzureFunction = async function( context: Context, req: HttpRequest): Promise<void> { const member = { name: req.body.name, isMember: true }; context.res = { status: 200, body: member }; }; export default httpTrigger; 13
Durable Functions "orchestrator function" を使⽤してステートフルワークフローを定義できる 2.0 で Entity Functions が追加(
≒ アクターモデル) 14
KEDA Kubernetes-based Event Driven Autoscaling Azure Functions のスケールコントローラ ーを応⽤して OSS
化 Microsoft と Redhat で共同開発 イベント駆動型 Pod をオートスケール可能 KEDA: イベント連動でスケール(0->1) HPC: リソースに応じたスケール(1->n) 15
キーテクノロジー: Azure Cosmos DB A globally distributed, massively scalable, multi-model
database service. 主な特⻑ サーバーレス - No infrastructure or VM management グローバル分散 - Turnkey geo-replication マルチモデル, マルチ API ストレージとスループットをエラスティックにスケール可能 99th パーセンタイル内に 10ms 以下のレイテンシーを SLA で保証 16
Cosmos DB Change Feed Serverless なマイクロサービスを実現するためのキーテクノロジー 同時に複数の Feed を出⼒可能(DB は稼働させながら追加可能)
17
Azure Functions CosmosDB Trigger Cosmos DB のデータ変更によって Azure Functions が発⽕する
複数の Change Feed を独⽴して配置可能 クロスパーテーションでデータにアクセスしたい場合に便利 18
キーテクノロジー: SignalR Service Web にリアルタイム通信機能を実装できるサービス WebSocket の Hub 機能が Serverless
化 19
CosmosDB トリガー + SignalR バインディングの例 import { AzureFunction, Context }
from "@azure/functions"; const cosmosDBTrigger: AzureFunction = async function( context: Context, documents: Tweet[] ): Promise<void> { // CosmosDB からのデータ⼊⼒確認 if (!!documents && documents.length > 0) { context.log("Document: ", documents[0].tweetText); } // SignalR へのメッセージ登録 context.bindings.signalRMessages = [ { target: "newMessage", arguments: [documents] } ]; }; 20
signalr.js によるクライアント側の実装 created: async function(): Promise<void> { // SignalRとコネクションを作成 const
connection = new HubConnectionBuilder() .withUrl(this.baseUrl) .configureLogging(LogLevel.Information) .build(); console.log("connecting..."); // SignalR Serviceへの接続 connection .start() .then(() => console.log("connected!")) .catch(console.error); // SignalRからの呼び出し connection.on("newMessage", (tweets: Tweet[]) => this.displayTweet(tweets)); // 切断 connection.onclose(() => console.log("disconnected")); } 21
キーテクノロジー: SQL DB Serverless (プレビュー) ⼀定時間アクセスしなければ、インスタンスが停⽌する 課⾦も⽌まるため、コストを最適化できる 再始動時やオートスケール時はコールドスタートなので⽤途は選ぶ 22
Azure Serverless の課題(個⼈的⾒解) フロントエンド SPA ベース Web アプリのデプロイ先が。。 SPA にとって
App Service はオーバースペック Static Website ホスティング機能がショボい Firebase や Netlify 相当の機能が求められる 23
本⽇のまとめ Azure Serverless は FaaS (Azure Functions) だけではない Serverless だけでも幅広いシナリオに対応したアーキテクチャを実現できる
OSS プロダクトが多いので、コントリビュートしましょう︕ 本⽇話せなかったこと Serverless での分散トレーシング(App Insights) Serverless なマイクロサービスの⼀括デプロイ(ARM Template) Smart Store リファレンスアーキテクチャ 24
ご清聴ありがとうございました Special Thanks! @yokawasa (Microsoft) @Ealsur (Microsoft) @shibayan(Microsoft MVP) @dz_(Microsoft
MVP) のステッカーご希望の⽅はお声がけ下さい 25