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
410
Azure Serverless 2019 Summer edition
Serverless Meetup Tokyo #13 で発表させていただいたスライドです。
miyake
July 30, 2019
Tweet
Share
More Decks by miyake
See All by miyake
Cosmos DB で持続可能な RAG を実現しよう!~ AOAI Dev Day ふりかえりを添えて / Sustainable RAG with Cosmos DB with recap AOAI Dev Day
miyake
0
250
Mirroring Azure Cosmos DB in Microsoft Fabric
miyake
2
160
LLM 時代におさえておきたい Azure Serverless ファミリーまとめ / serverlessdaystokyo2023-llm-aoai
miyake
9
2.6k
Nuxt Studio を使ってみた / nuxt-studio-intro
miyake
1
820
Microsoft Build 2023 で発表された Cosmos DB の注目アップデート / Microsoft Build 2023 Cosmos DB update
miyake
1
810
祝 🎉 両方とも正式リリース! GitHub Codespaces と Nuxt3 で次世代開発体験 / codespaces-nuxt3
miyake
0
1.4k
Static Site Generator でサイト構築 / building sites with static site generator
miyake
1
320
Design and implementation of Cosmos DB Change Feed-centric architecture
miyake
0
940
Well-Architected Framework を活用した Azure 設計パターン / azure-well-architected-framework
miyake
2
1.4k
Other Decks in Technology
See All in Technology
株式会社Awarefy(アウェアファイ)会社説明資料 / Awarefy-Company-Deck
awarefy
3
11k
Cracking the Coding Interview 6th Edition
gdplabs
14
28k
エンジニアが加速させるプロダクトディスカバリー 〜最速で価値ある機能を見つける方法〜 / product discovery accelerated by engineers
rince
4
560
コンピュータビジョンの社会実装について考えていたらゲームを作っていた話
takmin
1
590
【内製開発Summit 2025】イオンスマートテクノロジーの内製化組織の作り方/In-house-development-summit-AST
aeonpeople
2
580
いまからでも遅くない!コンテナでWebアプリを動かしてみよう!コンテナハンズオン編
nomu
0
150
Amazon Q Developerの無料利用枠を使い倒してHello worldを表示させよう!
nrinetcom
PRO
2
110
あなたが人生で成功するための5つの普遍的法則 #jawsug #jawsdays2025 / 20250301 HEROZ
yoshidashingo
2
250
入門 PEAK Threat Hunting @SECCON
odorusatoshi
0
140
役員・マネージャー・著者・エンジニアそれぞれの立場から見たAWS認定資格
nrinetcom
PRO
3
5.7k
RemoveだらけのPHPUnit 12に備えよう
cocoeyes02
0
250
OCI Success Journey OCIの何が評価されてる?疑問に答える事例セミナー(2025年2月実施)
oracle4engineer
PRO
2
110
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Documentation Writing (for coders)
carmenintech
67
4.6k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Building Your Own Lightsaber
phodgson
104
6.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Adopting Sorbet at Scale
ufuk
74
9.2k
GraphQLとの向き合い方2022年版
quramy
44
14k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
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