service fabric URL routing

前端 未结 1 445
梦谈多话
梦谈多话 2021-01-07 04:12

I am using the Azure Load Balancer with Azure service fabric to host multiple self host web applications, I\'d like to create a rule that allows me to route based on the use

相关标签:
1条回答
  • 2021-01-07 04:34

    The Azure Load Balancer only forwards traffic it receives on a port to a node in your cluster on another port (can be the same port or a different internal port). It operates on Layer 4 (TCP, UDP) so it doesn't know anything about HTTP or URLs (although it does allow HTTP probes).

    Here are a couple options for multiple web sites:

    If you want your web sites hosted internally on different ports (8181 and 8282), then you'll need something else to do URL routing. Azure Traffic Manager or Azure Application Gateway are possible options that would run outside your cluster. Your Azure Load Balancer would need to open a port for each web site, but the benefit is this way you can run your web sites on dedicated nodes and the ALB would automatically route traffic to the appropriate nodes based on which ports are open.

    Alternatively, you can set up your own stateless routing service that runs inside your cluster.

    Or you can skip routing altogether and just host all of your websites on port 80/443. As long as you're using an http.sys-based web host, which includes Katana, ASP.NET Core 1 WebListener, or anything you build on HttpListener, you can use the same port for all your websites and let the underlying http server route according to either a URL path or hostname, both of which are supported.

    0 讨论(0)
提交回复
热议问题