user8159689
user8159689

Reputation: 21

Running multiple ASP.net core web api applications on a single Kestrel server instance

Is it possible to run multiple asp.net core web api applications on same machine and listening to different ports and all the services should be running on same kestrel instance?

I have a requirement to develop multiple services (Micro services) using ASP.net core web api, and should be deployed on same machine and should use HTTPS and same SSL certificate. As per my findings, each service needs to be configured to run on separate kestrel instance, so there is an overhead of configuring same SSL thing for each service. I am trying to find a way to run all the services on single instance of kestrel so that I can enable SSL at one shot.

Upvotes: 2

Views: 2271

Answers (1)

user9041343
user9041343

Reputation: 11

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.)

Upvotes: 1

Related Questions