You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
I need to separate controllers by ports inside netcore2.0 selfhosted web service.
My configuration
Version of Microsoft.AspNetCore.Mvc : 2.0.1
Selfhosted service using Kestrel.
OS: Linux
Example:
There are 2 ports(p1 and p2) and 3 controllers(c1, c2, c3). Requirement scheme: c1 processes requests from p1, but c2 and c3 will processes requests from p2.
Is it available to do? If yes, them how can i do that?
PS pls mark this issue as question and sorry for my bad English
The text was updated successfully, but these errors were encountered:
If you want the same process (web application) to process all requests, then you need a proxy in front of your application that will handle these. NGinx, HAProxy can do it quite easily.
You can also listen to multiple ports and filter the requests in a middleware. You can use the urls parameter of kestrel to add more input addresses, and I think you can use multiple ports there.
Thanks for answer, @sebastienros. Variant with load balancers is not available for me. I want to separeate requests inside single app. Can you give some example of middleware, that will sort request between controllers based on input port?
Description of the problem:
I need to separate controllers by ports inside netcore2.0 selfhosted web service.
My configuration
Version of
Microsoft.AspNetCore.Mvc
: 2.0.1Selfhosted service using Kestrel.
OS: Linux
Example:
There are 2 ports(p1 and p2) and 3 controllers(c1, c2, c3). Requirement scheme: c1 processes requests from p1, but c2 and c3 will processes requests from p2.
Is it available to do? If yes, them how can i do that?
PS pls mark this issue as question and sorry for my bad English
The text was updated successfully, but these errors were encountered: