1

是否可以在同一台机器上运行多个 asp.net core web api 应用程序并监听不同的端口,并且所有服务都应该在同一个 kestrel 实例上运行?

我需要使用 ASP.net 核心 web api 开发多个服务(微服务),并且应该部署在同一台机器上,并且应该使用 HTTPS 和相同的 SSL 证书。根据我的发现,每个服务都需要配置为在单独的 kestrel 实例上运行,因此为每个服务配置相同的 SSL 事物会产生开销。我正在尝试找到一种在单个红隼实例上运行所有服务的方法,以便我可以一次性启用 SSL。

4

1 回答 1

1

Probably a little late to answer this, but you should consider introducing a reverse proxy that does SSL termination / load balancing.

Nginx seems to be the currently popular option for that with .NET Core (and there's good documentation available for "how to do it.")

Nginx -> ASP.NET Core connection can be on HTTP (as long as the .NET Core instances firewalled and are not exposed externally.)

于 2018-02-21T01:17:00.830 回答