(ChatGPT生成)

·

Azure PaaS サービス視点で見る .NET Aspire 統合マップ(2025-05-01 時点)

ポイント

  • PaaS = “プラットフォームとしてのサービス” なので OS/クラスタ管理はすべて Azure 側。
  • .NET Aspirebuilder.AddAzure*() 1 行で (1) ローカル用コンテナ/エミュレータ起動(2) IaC/Bicep 出力(3) クラウド配置 (azd / GitHub Actions) までカバーする “配線レイヤー” を担います。
  • 以下では サービスそのものの特性Aspire 側の提供範囲 (GA / Preview) をセットで整理します。
カテゴリAzure PaaS サービス (正式名称)代表的なプラン/スケールサービス概要・主要ユースケース.NET Aspire サポート状況
Compute / ServerlessAzure Container AppsConsumption / Dedicated Workload Profiles – KEDA によるイベント & CPU/メモリ自動スケール100% コンテナ指向のマネージド実行基盤。マルチレプリカ+ゼロスケール。マイクロサービスやバックエンド API を“クラスタ意識ゼロ”で実行PublishAsAzureContainerApp()GA。AppHost/Project/Executable いずれも対応 (Deploy .NET Aspire projects to Azure Container Apps – Learn Microsoft, Configure Azure Container Apps environments – .NET Aspire)
Azure FunctionsConsumption / Premium / App Service – HTTP・キュー・Timer 等イベントで起動、課金は実行時間単位イベント駆動のサーバーレス関数。スケールアウトとゼロスケールが自動AddAzureFunctionsProject()Preview(.NET 8/9 Isolated 必須、現状 ACA デプロイのみ) (NET Aspire Azure Functions integration (Preview) – Learn Microsoft, Aspire.Hosting.Azure.Functions 9.2.1-preview.1.25222.1 – NuGet)
Data (ストレージ & DB)Azure Storage (Blobs / Queues / Tables)LRS / GRS / RA-GRS、アクセス階層 Hot–Cool–Archive汎用オブジェクトストレージ。静的サイト/メッセージキュー/簡易 NoSQL 等にAddAzureStorage() GA(Blobs/Queues/Tables 各リソースを子として生成可) (NET Aspire Azure Blob Storage integration – Learn Microsoft, Aspire.Hosting.Azure.Storage 9.2.1 – NuGet)
Azure Cosmos DB (SQL API)Serverless / Provisioned Throughput – グローバル分散・マルチマスター低レイテンシ地理分散 NoSQL。IoT/リアルタイム分析AddAzureCosmosDB() GA(エミュレータ対応、子コンテナ自動起動可) (NET Aspire Azure Cosmos DB integration – Learn Microsoft)
Azure SQL DatabaseDTU / vCore / Serverless – 99.995 % SLA、自動バックアップフルマネージド RDBMS。既存オンプレ SQL Server 資産のクラウド移行AddAzureSqlServer().AddDatabase() GA(SQL Server Container or PaaS DB を選択してデプロイ) (NET Aspire SQL Server integration – Learn Microsoft)
Azure Database for PostgreSQL – Flexible ServerBurstable / General Purpose / Memory Optimized – 99.99 % SLA、ゾーン冗長OSS PostgreSQL 互換のマネージド DB。エンタープライズ ERP などAddAzurePostgresFlexibleServer() GA(Postgres コンテナ or PaaS DB) (NET Aspire Azure PostgreSQL integration – Learn Microsoft)
Azure Cache for RedisBasic / Standard / Premium / Enterprise – sub-ms レイテンシ分散キャッシュ・セッションストア。AI RAG のベクトルキャッシュ用途にもAddAzureRedis() GA(ローカルは Redis / Valkey / Garnet コンテナ選択可) (NET Aspire Azure Cache for Redis integration – Learn Microsoft)
Messaging / Streaming / RealtimeAzure Service BusBasic / Standard / Premium – キュー & トピック、トランザクションエンタープライズメッセージング (注文処理、イベント駆動)AddAzureServiceBus() GA(名前空間 & キュー/トピック子リソース) (NET Aspire Azure Service Bus integration – Learn Microsoft)
Azure Event HubsStandard / Dedicated / Premium – 最大 20 MB/s Ingressビッグデータストリーミング/テレメトリ集約AddAzureEventHubs() GA(子ハブ生成) (NET Aspire Azure integrations overview – Learn Microsoft)
Azure SignalR ServiceFree / Standard / Premium – WebSocket ≒ >100K 同時接続リアルタイム Push (チャット・ダッシュボード)AddAzureSignalR() GA(サーバーレス/クラシック両モード) (AzureSignalRExtensions.AddAzureSignalR Method (Aspire.Hosting))
Secrets / IDAzure Key VaultStandard / Premium – HSM/ソフトウェア キー、RBAC & MS Entra 連携シークレット・証明書・キーの安全保管。CI/CD 連携も容易AddAzureKeyVault() GA(Managed Identity 付与を自動化) (NET Aspire Azure Key Vault integration – Learn Microsoft)
AIAzure OpenAI ServiceProvisioned Throughput / PAYG Tokens – GPT-4o, GPT-4-32K 等LLM 推論 API。チャット/RAG/Agent 実装AddAzureOpenAI() Preview (Client Only) – DI で OpenAIClient を注入。ホスティングリソース作成は不要 (NET Aspire Azure OpenAI integration (Preview) – Learn Microsoft)

サービス階層をどう使い分けるか

シナリオ推奨 PaaS (+ Aspire 呼び出し)補足
スケーラブル Web APIAzure Container Apps PublishAsAzureContainerApp()Functions より長時間・接続維持が必要な場合
イベント駆動タスクAzure Functions AddAzureFunctionsProject()Consumption でゼロスケール課金/DLQ は Service Bus へ
グローバル NoSQLCosmos DB AddAzureCosmosDB()マルチリージョン自動リプリケーション
低レイテンシ キャッシュAzure Cache for Redis AddAzureRedis()Db レイヤの負荷削減/RAG ベクトルストア
トランザクションメッセージService Bus AddAzureServiceBus()Transactional API で Exactly-Once 保証
大規模テレメトリEvent Hubs AddAzureEventHubs()AKS/IoT デバイス→ ADLS Gen-2 経由で分析
シークレット管理Key Vault AddAzureKeyVault()Aspire が環境変数注入を自動化・ローテーション対応

現状 Preview 機能の注意点

  • Azure Functions 統合2025 Q1 GA 予定(公式ロードマップ)で、
  • Azure OpenAIホスティング不要 な API クライアント統合のみ。リソース自動プロビジョンは行われないため、先に Portal/az CLI で作成したリソースの Endpoint / Deployment 名 を設定してください。 (NET Aspire Azure OpenAI integration (Preview) – Learn Microsoft)

まとめ

  1. PaaS サービスの強み (自動スケール・SLA・マネージド保守) と .NET Aspire の自動配線 が合わさることで、従来の “インフラを構築してからコードを書く” 作業はほぼ不要になります。
  2. Compute 層Container AppsFunctions の 2 本柱。ステートフル or 長時間接続が要る場合は前者、純イベント処理なら後者。
  3. Data / Messaging / Secrets は Aspire が Managed Identity を暗黙設定 → ソース管理に接続文字列が残らない構成がデフォルト。
  4. Preview の機能は将来 API 変更の可能性があるため、本番導入時は ターゲットバージョンを固定し、リリースノートを確認してください。

これで PaaS レイヤーの鳥瞰図と .NET Aspire が提供する統合範囲を俯瞰できます。今後の設計・検証の際にお役立てください。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です