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
150
LLM 時代におさえておきたい Azure Serverless ファミリーまとめ / serverlessdaystokyo2023-llm-aoai
miyake
9
2.6k
Nuxt Studio を使ってみた / nuxt-studio-intro
miyake
1
810
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
関東Kaggler会LT: 人狼コンペとLLM量子化について
nejumi
3
600
エンジニアが加速させるプロダクトディスカバリー 〜最速で価値ある機能を見つける方法〜 / product discovery accelerated by engineers
rince
4
380
人はなぜISUCONに夢中になるのか
kakehashi
PRO
6
1.7k
2025-02-21 ゆるSRE勉強会 Enhancing SRE Using AI
yoshiiryo1
1
370
Cloud Spanner 導入で実現した快適な開発と運用について
colopl
1
720
Helm , Kustomize に代わる !? 次世代 k8s パッケージマネージャー Glasskube 入門 / glasskube-entry
parupappa2929
0
250
(機械学習システムでも) SLO から始める信頼性構築 - ゆる SRE#9 2025/02/21
daigo0927
0
150
2.5Dモデルのすべて
yu4u
2
880
分解して理解する Aspire
nenonaninu
1
290
データマネジメントのトレードオフに立ち向かう
ikkimiyazaki
6
1k
ソフトウェアエンジニアと仕事するときに知っておいたほうが良いこと / Key points for working with software engineers
pinkumohikan
0
100
ユーザーストーリーマッピングから始めるアジャイルチームと並走するQA / Starting QA with User Story Mapping
katawara
0
210
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
133
33k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.3k
Statistics for Hackers
jakevdp
797
220k
Building Your Own Lightsaber
phodgson
104
6.2k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
960
A Tale of Four Properties
chriscoyier
158
23k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Music & Morning Musume
bryan
46
6.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Being A Developer After 40
akosma
89
590k
BBQ
matthewcrist
87
9.5k
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