0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ASP.NET(.NET Core/5+) ホスティング方式:6分類

Last updated at Posted at 2025-05-16

ASP.NET(.NET Core/5+) ホスティング方式:6分類

ASP.NET(.NET Core/5+)アプリのホスティング方法に関して
整理された情報が見つけられなかったので、
6種類に分類してまとめてみました。

① IIS(インプロセス)

  • ANCM (AspNetCoreModule) を使用し、IIS (w3wp.exe) のプロセス内で ASP.NET Core が動作
  • 最も高速で、開発も簡単
  • Windows 環境でのみ有効

② IIS(アウトオブプロセス)

  • ANCM が Kestrel を別プロセスで起動し、IIS がリバースプロキシ
  • プロセス分離による柔軟性がある
  • Windows 環境のみ

③ IIS + Application Request Routing(ARR)

  • IIS + ARR 構成で、バックエンドの Kestrel へリバースプロキシ
  • 複数ノード構成やスケーラビリティを持たせたい場合に有効

④ nginx/Apache + Kestrel

  • Linux環境での一般的な構成
  • nginx(またはApache)が Kestrel にリバースプロキシ
  • Docker やクラウド構成でもよく使われる

⑤ Kestrel 単体(自己ホスト)

  • 自前でポートをバインドしてHTTPサーバとして動作
  • 軽量・シンプル
  • 本番利用にはプロキシの併用が推奨される

⑥ クラウドホスティング(PaaS/サーバーレス/コンテナ)

  • Azure App ServiceAWS Elastic Beanstalk 等のPaaS
  • Azure Functions などのサーバーレス
  • Kubernetes (AKS, EKS 等) 上のコンテナで稼働する Kestrel
  • プラットフォームがスケーリングや運用を自動で管理
  • 運用負荷を低減し、迅速に展開可能

🔎 おすすめシナリオ別選定

シナリオ 推奨構成
高速・簡単な開発 ① IIS(インプロセス)
プロセス分離や安定性が必要 ② IIS(アウトオブプロセス)
複数ノード・負荷分散構成 ③ IIS + ARR / ④ nginx
LinuxやDocker運用 ④ nginx + Kestrel
最小構成やローカル動作確認 ⑤ Kestrel 単体
運用負荷低減・迅速なスケール ⑥ クラウドホスティング
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?